diff options
Diffstat (limited to 'src/routes.php')
-rw-r--r-- | src/routes.php | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/routes.php b/src/routes.php index 9b3266b..027603c 100644 --- a/src/routes.php +++ b/src/routes.php @@ -1,6 +1,29 @@ <?php Route::group(array('https'), function() { + Route::api(['version' => 'v1', 'protected' => false], function () { + + Route::get('user/login', 'CamilStaps\BotleaguesApi\UserController@login'); + 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', @@ -8,7 +31,6 @@ Route::group(array('https'), function() { Route::resource('user', 'CamilStaps\BotleaguesApi\UserController', ['except' => ['index', 'show', 'create','edit','store']]); - Route::get('user/login', 'CamilStaps\BotleaguesApi\UserController@login'); Route::group(array('before' => 'administrator'), function() { @@ -25,26 +47,4 @@ 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']]); - - }); - });
\ No newline at end of file |