diff options
Diffstat (limited to 'src/routes.php')
-rw-r--r-- | src/routes.php | 45 |
1 files changed, 43 insertions, 2 deletions
diff --git a/src/routes.php b/src/routes.php index 707bf06..5d7b8b6 100644 --- a/src/routes.php +++ b/src/routes.php @@ -1,9 +1,50 @@ <?php Route::group(array('https'), function() { + + Route::api(['version' => 'v1', 'protected' => false], function () { + + Route::resource('bot', 'CamilStaps\BotleaguesApi\BotController', + ['only' => ['index','show']]); + + Route::resource('competition', 'CamilStaps\BotleaguesApi\CompetitionController', + ['only' => ['index','show']]); + + Route::resource('competition_type', 'CamilStaps\BotleaguesApi\CompetitionTypeController', + ['only' => ['index','show']]); + + Route::resource('game', 'CamilStaps\BotleaguesApi\GameController', + ['only' => ['index','show']]); + + Route::resource('participant', 'CamilStaps\BotleaguesApi\ParticipantController', + ['only' => ['index','show']]); + + Route::resource('user', 'CamilStaps\BotleaguesApi\UserController', + ['only' => ['index','show','store']]); + + }); + Route::api(['version' => 'v1', 'protected' => true, 'providers' => 'basic'], function () { + Route::resource('bot', 'CamilStaps\BotleaguesApi\BotController', - array('except' => ['create','edit'])); + ['except' => ['index', 'show', 'create','edit']]); + Route::resource('user', 'CamilStaps\BotleaguesApi\UserController', - array('except' => ['create','edit'])); + ['except' => ['index', 'show', 'create','edit','store']]); + //'before' => 'current_user']); + + Route::group(array('before' => 'administrator'), function() { + + Route::resource('competition', 'CamilStaps\BotleaguesApi\CompetitionController', + ['except' => ['index', 'show', 'create', 'edit']]); + + Route::resource('competition_type', 'CamilStaps\BotleaguesApi\CompetitionTypeController', + ['except' => ['index', 'show', 'create', 'edit']]); + + Route::resource('game', 'CamilStaps\BotleaguesApi\GameController', + ['except' => ['index', 'show', 'create','edit']]); + + }); + }); + });
\ No newline at end of file |