laravel5.2 之前是user.php在app下,之后自己创建model\user.php,即将user.php模型放到model目录下,导致自带的login , auth 验证的时候出现,app\user not found,不知道在哪里修改,求帮助,如下报错信息。:)
fatalthrowableerror in eloquentuserprovider.php line 130:class '\app\user' not foundin eloquentuserprovider.php line 130at eloquentuserprovider->createmodel() in eloquentuserprovider.php line 96at eloquentuserprovider->retrievebycredentials(array('email' => 'admin@ssd.com', 'password' => '081500943')) in sessionguard.php line 353at sessionguard->attempt(array('email' => 'admin@ssd.com', 'password' => '081500943'), false) in /export/usr/www/httpd2/htdocs/laravel/vendor/laravel/framework/src/illuminate/foundation/auth/authenticatesusers.php line 74at authcontroller->login(object(request))at call_user_func_array(array(object(authcontroller), 'login'), array(object(request))) in controller.php line 80at controller->callaction('login', array(object(request))) in controllerdispatcher.php line 146at controllerdispatcher->call(object(authcontroller), object(route), 'login') in controllerdispatcher.php line 94at controllerdispatcher->illuminate\routing\{closure}(object(request))at call_user_func(object(closure), object(request)) in pipeline.php line 52at pipeline->illuminate\routing\{closure}(object(request)) in redirectifauthenticated.php line 24at redirectifauthenticated->handle(object(request), object(closure))at call_user_func_array(array(object(redirectifauthenticated), 'handle'), array(object(request), object(closure))) in pipeline.php line 136
回复内容: laravel5.2 之前是user.php在app下,之后自己创建model\user.php,即将user.php模型放到model目录下,导致自带的login , auth 验证的时候出现,app\user not found,不知道在哪里修改,求帮助,如下报错信息。:)
fatalthrowableerror in eloquentuserprovider.php line 130:class '\app\user' not foundin eloquentuserprovider.php line 130at eloquentuserprovider->createmodel() in eloquentuserprovider.php line 96at eloquentuserprovider->retrievebycredentials(array('email' => 'admin@ssd.com', 'password' => '081500943')) in sessionguard.php line 353at sessionguard->attempt(array('email' => 'admin@ssd.com', 'password' => '081500943'), false) in /export/usr/www/httpd2/htdocs/laravel/vendor/laravel/framework/src/illuminate/foundation/auth/authenticatesusers.php line 74at authcontroller->login(object(request))at call_user_func_array(array(object(authcontroller), 'login'), array(object(request))) in controller.php line 80at controller->callaction('login', array(object(request))) in controllerdispatcher.php line 146at controllerdispatcher->call(object(authcontroller), object(route), 'login') in controllerdispatcher.php line 94at controllerdispatcher->illuminate\routing\{closure}(object(request))at call_user_func(object(closure), object(request)) in pipeline.php line 52at pipeline->illuminate\routing\{closure}(object(request)) in redirectifauthenticated.php line 24at redirectifauthenticated->handle(object(request), object(closure))at call_user_func_array(array(object(redirectifauthenticated), 'handle'), array(object(request), object(closure))) in pipeline.php line 136
check your config/auth.php file and update the following:
'providers' => [ 'users' => [ 'driver' => 'eloquent', 'model' => app\user::class, //