Controller 代码
public function signin(Requests\UserLoginRequest $request)
{
if (Auth::attempt([
'email'=>$request->get('email'),
'password'=>$request->get('password'),
'is_confirmed'=>1
])){
return redirect('/');
}else{
Session::flash('user_login_failed','密码不正确或邮箱不正确');
return redirect('/user/login')->withInput(['email'=>$request->get('email')]);
}
}