Skip to content

Instantly share code, notes, and snippets.

@jakeydevs
Created June 26, 2014 12:32
Show Gist options
  • Save jakeydevs/21d215a6e4e2d74b6f74 to your computer and use it in GitHub Desktop.
Save jakeydevs/21d215a6e4e2d74b6f74 to your computer and use it in GitHub Desktop.
Redirect to URL location with input (Laravel)
<?php
//-- Other working code above
if (Auth::attempt(array('username' => $username, 'password' => $password))) {
return Redirect::intended('workspaces/');
} else {
//-- Failed Auth
Session::flash('message', 'Username and/or password incorrect');
return Redirect::to('login')->withInput(Input::except('password'));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment