I am trying to implement google login using socialite plugin in laravel in which i want to set password filed (is user should set a new password before entering into the profile page).
After the password entering i need to create a new user entry via User::create() method ,but i don't know how to access the $user variable in my createUser function
Code
public funtion handleCallback($provider){
//get userinfo
$user = Socialite::driver($provider)->user();
//set new password
return view('views.new-password');
}
//new password and create user
public function createUser(Request $request)
{
//$user from handleCallback
dd($user)
}
Can i use a session variable to store this data so that i can access across multiple controllers is it the rightway to do this??
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2l7lESF
via IFTTT
Aucun commentaire:
Enregistrer un commentaire