您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

Laravel 5.2 Model 目录问题

2024/2/28 15:42:10发布17次查看
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, //
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product