使用Auth策略类导致的问题

来源:6-6 使用Auth实现用户登录逻辑

慕无忌9435925

2018-06-30

http://img.mukewang.com/szimg/5b379c36000122d811730544.jpg


Argument 1 passed to Illuminate\Auth\EloquentUserProvider::validateCredentials() must be an instance of Illuminate\Contracts\Auth\Authenticatable, instance of App\User given, called in /Applications/XAMPP/xamppfiles/htdocs/laravel/vendor/laravel/framework/src/Illuminate/Auth/SessionGuard.php on line 380 and defined

写回答

1回答

轩脉刃

2018-07-10

你的User继承的类是不是错误的。


use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable

0
2
慕无忌9435925
是的,解决了,可是课程前面说不需要继承这个类呀
2018-07-10
共2条回复

Laravel快速开发简书

Laravel最新特性结合Mysql异步消息队列、ElasticSearch搜索引擎、Debugbar调试利器开发简书

1218 学习 · 613 问题

查看课程