public function doLogin(LoginFormRequest $request)
 {
     $credentials = $request->only('email', 'password');
     $toRemember = $request->has('remember_me');
     if (Auth::attempt($credentials, $toRemember)) {
         return redirect()->intended('/admin');
     }
     return redirect()->back()->withErrors(['email' => 'Your credentials do not match our records']);
 }
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(LoginFormRequest $request)
 {
     $input = $request->only('email', 'password');
     try {
         if (Sentinel::authenticate($input, $request->has('remember'))) {
             $this->redirectWhenLoggedIn();
         }
         return redirect()->back()->withInput()->withErrorMessage('Invalid credentials provided');
     } catch (\Cartalyst\Sentinel\Checkpoints\NotActivatedException $e) {
         return redirect()->back()->withInput()->withErrorMessage('User Not Activated.');
     } catch (\Cartalyst\Sentinel\Checkpoints\ThrottlingException $e) {
         return redirect()->back()->withInput()->withErrorMessage($e->getMessage());
     }
 }
 /**
  * @param array $credentials
  * @param LoginFormRequest $request
  * @return bool
  */
 protected function loginAttempt($credentials, LoginFormRequest $request)
 {
     return Auth::attempt($credentials, $request->has('remember'));
 }