app/controllers/SessionsController.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()
	{
		$formData = Input::only('email','password');
		$this->signInForm->validate($formData);
		if (Auth::attempt($formData))
		{
			Flash::message('Welcome Back!');
		return Redirect::route('home')->with('flash_message', 'Welcome aboard!');
		}
		else{
			return Redirect::route('login')->withErrors('Username and/or Password incorrect');
		}
	}
public function store ( ) { $ formData = Input :: only ( 'email' , 'password' ) ; $ this -> signInForm -> validate ( $ formData ) ; if ( Auth :: attempt ( $ formData ) ) { Flash :: message ( 'Welcome Back!' ) ; return Redirect :: route ( 'home' ) -> with ( 'flash_message' , 'Welcome aboard!' ) ; } else { return Redirect :: route ( 'login' ) -> withErrors ( 'Username and/or Password incorrect' ) ; } }
Store a newly created resource in storage.
Store a newly created resource in storage .
//Fetch the form input //Validate the form //if is valid, then try to sign in