laravel自定义用户登录认证报错

报错内容如下

Illuminate\Auth\EloquentUserProvider::validateCredentials(): Argument #1 ($user) must be of type Illuminate\Contracts\Auth\Authenticatable, App\Models\User given, called in ...

解决办法

#User模型添加如下代码

#调用
use Illuminate\Foundation\Auth\User as Authenticatable;

#修改
class User extends Authenticatable
{
}