如何使用 laravel 实现用户登录

我 这里 一直 报 这个错误
Argument 1 passed to Illuminate\Auth\EloquentUserProvider::validateCredentials() must be an instance of Illuminate\Auth\UserInterface, instance of User given, called in E:\wamp\www\test\vendor\laravel\framework\src\Illuminate\Auth\Guard.php on line 378 and defined
已邀请:

豁达于心

赞同来自:

public function postLogin()
{
    $data = array(
        'email' => Input::get('email'),
        'password' => Input::get('password')
        );
    if (Auth::attempt($data))
    {
        return 'ok';
    } else {
        return 'no';
    }
}

要回复问题请先登录注册