app/controllers/SessionController.php
/**
	 * Store a newly created resource in storage.
	 *
	 * @return Response
	 */
Store a newly created resource in storage.
@return Response
Store a newly created resource in storage . @return Response
public function store()
	{
		$email = Input::get('email');
        $pass  = Input::get('password');
        if (Auth::attempt(array('email' => $email, 'password' => $pass)))
        {
            $user = User::find(Auth::user()->id);
            $user->last_login = time();
            $user->save();
            return Redirect::route('home.index');
        }
        return View::make('session.create')->with('msg', '<span style="color: red">Login failed... please verify credentials</span>');
	}
public function store ( ) { $ email = Input :: get ( 'email' ) ; $ pass = Input :: get ( 'password' ) ; if ( Auth :: attempt ( array ( 'email' => $ email , 'password' => $ pass ) ) ) { $ user = User :: find ( Auth :: user ( ) -> id ) ; $ user -> last_login = time ( ) ; $ user -> save ( ) ; return Redirect :: route ( 'home.index' ) ; } return View :: make ( 'session.create' ) -> with ( 'msg' , '<span style="color: red">Login failed... please verify credentials</span>' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .