Created
January 7, 2016 16:06
-
-
Save hoanganh25991/66704032057717e1db88 to your computer and use it in GitHub Desktop.
routes in multiple-choice-test
This file contains hidden or 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 | |
/* | |
|-------------------------------------------------------------------------- | |
| Application Routes | |
|-------------------------------------------------------------------------- | |
| | |
| Here is where you can register all of the routes for an application. | |
| It's a breeze. Simply tell Laravel the URIs it should respond to | |
| and give it the Closure to execute when that URI is requested. | |
| | |
*/ | |
Route::get('login', 'LoginController@get'); | |
Route::post('login', 'LoginController@post'); | |
Route::get('result', 'ResultController@get'); | |
Route::post('result', 'ResultController@post'); | |
Route::group(array('before'=>'auth'), function(){ | |
Route::get('/', function(){return Redirect::to('test');}); | |
Route::get('admin', 'AdminController@get'); | |
Route::get('test', 'TestController@get'); | |
Route::post('test', 'TestController@post'); | |
Route::get('admin/test-options', 'TestOptionsController@view'); | |
Route::get('admin/chapter-rate', 'ChapterRateController@view'); | |
Route::model('chapter', 'Chapter');//bind model for chapters | |
Route::get('admin/chapters', 'ChaptersController@view'); | |
Route::get('admin/chapters/{chapter}', array( | |
'uses' => 'ChaptersController@getChapter' | |
)); | |
Route::post('admin', 'AdminController@post'); | |
Route::post('admin/test-options', 'TestOptionsController@handlePost'); | |
Route::post('admin/chapter-rate', 'ChapterRateController@handlePost'); | |
Route::post('admin/chapters', 'ChaptersController@handlePost'); | |
Route::post('admin/chapters/{chapter}', array( | |
'uses' => 'ChapterQuestionsController@handleQuestionPost' | |
)); | |
}); | |
Route::get('log-out', 'LogOutController@get'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment