Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Laravel 5 拉威尔5.7+;社交网站类型错误:参数1传递给Illumb\Auth\SessionGuard::login()_Laravel 5_Laravel Socialite - Fatal编程技术网

Laravel 5 拉威尔5.7+;社交网站类型错误:参数1传递给Illumb\Auth\SessionGuard::login()

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

我正在使用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中调用

我的登录控制器:


我错过了返回$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;
}