public function postIndex() { $postData = $this->request()->postVariables(); $user = Auth::authByCredentials(StdLoginCredentials::make($postData['username'], $postData['password'])); if ($user && Auth::loggedIn()) { Redirect::to('/admin')->now(); } else { Redirect::to('/admin')->with('msg', 'Login Failed, please check username and password is correct')->now(); } }