Laravel 的登录验证 Auth::attempt () 方法无法使用,求大神指点
在做一个项目的时候用到laravel,今天做登录的时候,验证这块老是出问题,照着官网文档写的
这个是user控制器的方法
if(Auth::attempt(array('email' => 'abc@qq.com', 'password' => '123456')))
{
echo 'success';
}
else
{
echo 'failed';
}
一直提示下面这个错误
Argument 1 passed to Illuminate\Auth\EloquentUserProvider::validateCredentials() must be an instance of Illuminate\Contracts\Auth\Authenticatable, instance of App\User given, called in D:\wamp\www\laravel\vendor\laravel\framework\src\Illuminate\Auth\Guard.php on line 390 and defined
有没有朋友遇到过这种错误,麻烦指点一下,谢谢
推荐文章: