我修改了代码以满足您的建议,但不起作用:
public function login(){
$credentials = [
'email' => \Input::get('email'),
'pass' => \Input::get('pass')
];
if (\Auth::attempt($credentials)) {
return "Logged In";
}
// return \Redirect::to('/User/login');
return "No Logged In";
}