包含模型时的Laravel错误

时间:2016-01-11 11:00:30

标签: php laravel authentication eloquent

config\auth.php我已从'driver' => 'database'更改为'driver' => 'eloquent'现在,当用户想要登录时出现错误:

ErrorException in ClassLoader.php line 412: 
 include(C:\xampp\htdocs\bluedrive\drive/app/User.php): failed to open stream: 
 No such file or directory

为什么会发生这种情况,我该如何解决?

1 个答案:

答案 0 :(得分:0)

也许您的Authentication Model(在config\auth.php中)被错误定义。

必须定义有效的eloquent模型:

'model' => App\User::class