to add a facebook login but I get this error:
ErrorException (E_NOTICE)
Undefined variable: service
it is in the callback function:
$user = $service->createOrGetUser(Socialite::driver('facebook')->user());
Code: Select all
public function callback()
{
$user = $service->createOrGetUser(Socialite::driver('facebook')->user());
auth()->login($user);
return redirect()->to('/home');
}
Where should the $service variable be declared? (I suspect something might have gone wrong when I installed socialite... is there any way to check that?)
Thanks
