【发布时间】:2014-07-10 21:54:54
【问题描述】:
我有以下代码:
if(!empty($email) && !empty($password))
{
if (Auth::attempt(array('email' => $email, 'password' => $password, 'activated' => 1)))
{
return Redirect::route('home');
}else{
return Redirect::route('signin')->with('message', 'Login Failed. Please try again.');
}
}else{
return Redirect::route('error');
}
以上是我的应用程序的登录功能。登录视图加载和用户输入日期和以上被执行。 Auth::attempt 传递了上面的第三个参数,以检查表中的激活字段是否为 1。它会抛出一个奇怪的错误,就是这样:
请帮助我了解发生了什么问题。
【问题讨论】: