Laravel5.2는 App 아래에 User.php가 있었습니다. 그 후 제가 직접 ModelUser.php를 생성하고 Model 디렉토리에 User.php 모델을 넣어두었더니 내장된 Login과 Auth가 나타났습니다. 확인. AppUser를 찾을 수 없습니다. 수정해야 할 위치를 알고 계시다면 다음과 같은 오류 메시지가 보고됩니다. :)
<code>FatalThrowableError in EloquentUserProvider.php line 130: Class '\App\User' not found in EloquentUserProvider.php line 130 at EloquentUserProvider->createModel() in EloquentUserProvider.php line 96 at EloquentUserProvider->retrieveByCredentials(array('email' => 'Admin@ssd.com', 'password' => '081500943')) in SessionGuard.php line 353 at 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 74 at AuthController->login(object(Request)) at call_user_func_array(array(object(AuthController), 'login'), array(object(Request))) in Controller.php line 80 at Controller->callAction('login', array(object(Request))) in ControllerDispatcher.php line 146 at ControllerDispatcher->call(object(AuthController), object(Route), 'login') in ControllerDispatcher.php line 94 at ControllerDispatcher->Illuminate\Routing\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in RedirectIfAuthenticated.php line 24 at 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 </code>
Laravel5.2는 App 아래에 User.php가 있었습니다. 그 후 제가 직접 ModelUser.php를 생성하고 Model 디렉토리에 User.php 모델을 넣어두었더니 내장된 Login과 Auth가 나타났습니다. 확인. AppUser를 찾을 수 없습니다. 수정해야 할 위치를 알고 계시다면 다음과 같은 오류 메시지가 보고됩니다. :)
<code>FatalThrowableError in EloquentUserProvider.php line 130: Class '\App\User' not found in EloquentUserProvider.php line 130 at EloquentUserProvider->createModel() in EloquentUserProvider.php line 96 at EloquentUserProvider->retrieveByCredentials(array('email' => 'Admin@ssd.com', 'password' => '081500943')) in SessionGuard.php line 353 at 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 74 at AuthController->login(object(Request)) at call_user_func_array(array(object(AuthController), 'login'), array(object(Request))) in Controller.php line 80 at Controller->callAction('login', array(object(Request))) in ControllerDispatcher.php line 146 at ControllerDispatcher->call(object(AuthController), object(Route), 'login') in ControllerDispatcher.php line 94 at ControllerDispatcher->Illuminate\Routing\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52 at Pipeline->Illuminate\Routing\{closure}(object(Request)) in RedirectIfAuthenticated.php line 24 at 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 </code>
config/auth.php 파일을 확인하고 다음을 업데이트하세요.
<code>'providers' => [ 'users' => [ 'driver' => 'eloquent', 'model' => App\User::class, //<------update your namespace here ] ], and of course update your namespace in your User.php file</code>