Skip to content

Instantly share code, notes, and snippets.

@antonybudianto
Last active August 29, 2015 14:22
Show Gist options
  • Save antonybudianto/ba0ca652000eba2a57a0 to your computer and use it in GitHub Desktop.
Save antonybudianto/ba0ca652000eba2a57a0 to your computer and use it in GitHub Desktop.
Auth Route Laravel 5.1
// Route for authentication
Route::group(['namespace' => 'Auth'], function() {
Route::group(['prefix' => 'auth'], function() {
// Authentication routes...
get('login', 'AuthController@getLogin');
get('logout', 'AuthController@getLogout');
post('login', 'AuthController@postLogin');
// Registration routes...
get('register', 'AuthController@getRegister');
post('register', 'AuthController@postRegister');
});
Route::group(['prefix' => 'password'], function() {
// Password reset link request routes...
get('email', 'PasswordController@getEmail');
post('email', 'PasswordController@postEmail');
// Password reset routes...
get('reset/{token}', 'PasswordController@getReset');
post('reset', 'PasswordController@postReset');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment