Skip to content

Commit

Permalink
Seperating out Public Api Routes
Browse files Browse the repository at this point in the history
  • Loading branch information
TJTorola committed May 31, 2016
1 parent 41a1b6a commit 95d9d28
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions app/Http/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
*/
Route::group(['prefix' => 'auth'], function() {

Route::post('/', 'AuthController@login');
Route::get('logout', 'AuthController@logout');
Route::post('register', 'AuthController@register');

Expand Down Expand Up @@ -232,12 +231,12 @@
| Store Group (Optimized storefront requests)
|--------------------------------------------------------------------------
*/
Route::group(['prefix' => 'store'], function() {

Route::get('menus', 'StoreController@getMenus');
Route::post('invoice', 'StoreController@postInvoice');

});
// Route::group(['prefix' => 'store'], function() {
//
// Route::get('menus', 'StoreController@getMenus');
// Route::post('invoice', 'StoreController@postInvoice');
//
// });

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -270,10 +269,23 @@
});
});

/*
|--------------------------------------------------------------------------
| Public API (All of the publicaly available resources in one place)
|--------------------------------------------------------------------------
*/

Route::group(['prefix' => 'public-api'], function() {

Route::get('offer/{id}', 'PublicController@offer');

Route::get('catalog/{id}', 'CatalogsController@show');
Route::get('menus', 'PublicController@indexMenus');
Route::get('offers', 'PublicController@indexOffers');
Route::get('offer/{id}', 'PublicController@showOffer');
Route::get('page/{slug}', 'PagesController@show')->where(['slug' => '.*']);

Route::post('auth', 'AuthController@login');
Route::post('invoice', 'InvoicesController@store');

});

/*
Expand Down

0 comments on commit 95d9d28

Please sign in to comment.