Last active
August 29, 2015 14:04
-
-
Save ezura/71938efe290ef06a73ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* If You want to prohibit that guest users display it, | |
* write in this group. | |
*/ | |
Route::group(array('before' => 'auth'), function() | |
{ | |
Route::get('/', array( | |
'uses' => 'MainController@index', | |
'as' => 'home')); | |
}); | |
Route::get('login', array( | |
'uses' => 'SessionController@index', | |
'as' => 'session.new')); | |
Route::post('login', array( | |
'before' => 'csrf', | |
'uses' => 'SessionController@login', | |
'as' => 'session.create' | |
)); | |
Route::get('logout', array( | |
'uses' => 'SessionController@logout', | |
'as' => 'session.destroy' | |
)); | |
// manage user information | |
Route::get('signup/{type?}', array( | |
'uses' => 'UserController@index', | |
'as' => 'user.new' | |
)); | |
Route::post('signup/{type?}', array( | |
'uses' => 'UserController@create', | |
'as' => 'user.create' | |
)); | |
/* When GET http://hogehoge/hoge/{method}, you can call RegisterController.get{method} | |
* I don't know it is good practice in laravel.. | |
* I think we should discuss coding rule. | |
*/ | |
// Route::controller('hoge', 'RegisterController'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment