Laravel 5 拉威尔5.7+;社交网站类型错误:参数1传递给Illumb\Auth\SessionGuard::login()
我正在使用solcialite通过Gihub登录Laravel,但登录有问题。我收到一个错误:Symfony\Component\Debug\Exception\FatalThrowableError(E\u可恢复\u错误) 类型错误:传递给Illumb\Auth\SessionGuard::login()的参数1必须实现接口Illumb\Contracts\Auth\Authenticatable,给定null,在第292行的/var/www/html/testio/vendor/laravel/framework/src/illumb/Auth/AuthManager.php中调用 我的登录控制器:Laravel 5 拉威尔5.7+;社交网站类型错误:参数1传递给Illumb\Auth\SessionGuard::login(),laravel-5,laravel-socialite,Laravel 5,Laravel Socialite,我正在使用solcialite通过Gihub登录Laravel,但登录有问题。我收到一个错误:Symfony\Component\Debug\Exception\FatalThrowableError(E\u可恢复\u错误) 类型错误:传递给Illumb\Auth\SessionGuard::login()的参数1必须实现接口Illumb\Contracts\Auth\Authenticatable,给定null,在第292行的/var/www/html/testio/vendor/larave
我错过了返回$users;关于最后一个函数:
公共函数userFindorCreate($github\u user){
$user=user::where('provider\u id',$github\u user->id)->first();
如果(!$user){
$user=新用户;
$user->name='jojo';
$user->email=$github_user->getEmail();
$user->provider_id=$github_user->getid();
$user->save();
}
返回$user;
}