Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Login Laravel登录错误_Login_Laravel 4 - Fatal编程技术网

Login Laravel登录错误

Login Laravel登录错误,login,laravel-4,Login,Laravel 4,我正在开发一个带有登录凭据的laravel应用程序 但我在登录时出错了 这是我的控制器文件 public function check_login() { $credents=array('username'=>Input::get('username'),'password'=>Input::get('password')); if(Auth::attempt($credents)) { echo "Success"; }

我正在开发一个带有登录凭据的laravel应用程序

但我在登录时出错了

这是我的控制器文件

public function check_login()
{
    $credents=array('username'=>Input::get('username'),'password'=>Input::get('password'));
    if(Auth::attempt($credents))
    {

        echo "Success";
    }
    else
    {
        echo "Sorry,";
    }
}
和我的auth.php文件

 'driver' => 'eloquent',

 'model' => 'User',

 'table' => 'users',

 'reminder' => array(

    'email' => 'emails.auth.reminder',

    'table' => 'password_reminders',

    'expire' => 60,

),
从表单获取用户名、密码。 loggin错误工作正常。但是没有显示登录成功。我的密码为md5格式


任何人请给出一个好的解决方案。谢谢

您没有发布您的模型,但是如果您使用的是自定义用户模型,您需要像实现一样实现UserInterface和EmployableInterface。

您遇到了什么错误?我猜问题是你使用的是MD5。为什么不直接使用Hash::make?ErrorException E_传递给Illumb\Auth\EloquentUserProvider::validateCredentials的未知参数1必须是Illumb\Auth\UserInterface的实例,用户给定的实例,在第371行的F:\xampp\htdocs\laravel\vendor\laravel\framework\src\Illumb\Auth\Guard.php中调用并定义