0
洛用戶後,我怎麼可以加載自己的數據(我想在會話設置他的名字)Laravel4:登錄成功後,獲取用戶數據
# Authorize user
if (Auth::attempt(array('email' => $input['email'], 'password' => $input['password']))) {
// doesnt work: $user = User::where('email',$input['email']);
//
// Load User details here and set in the session
return Redirect::to('/');
} else {
return Redirect::to('/')->with('message', 'Invalid User/Password');
}