Login Laravel登录错误
我正在开发一个带有登录凭据的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"; }
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中调用并定义