public function postLogin(Request $request)
{
if($input=Input::all()){
if(!Auth::attempt(['phone' => $input['mobile'], 'password' => $input['password']])){
return back()->with('msg', '用户名或者密码错误!');
}
return redirect('');
}
用这种方法就一直报错,为什么啊,我试过了,账号密码是正确的,但一直报错是用户名或者密码错误
如果你确保你的用户名和密码是对的。那么就要看看你的
Auth::attempt()
是怎么处理用户名和密码的了,很有可能问题就在Auth::attempt()
这里面