-
Notifications
You must be signed in to change notification settings - Fork 1
/
routes.php
37 lines (28 loc) · 1.25 KB
/
routes.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
Route::group([
'prefix' => 'api/v1',
'namespace' => 'Octommerce\API\Controllers',
'middleware' => 'cors'
], function() {
Route::get('products', 'Products@index');
Route::get('products/{id}', 'Products@show');
Route::get('categories', 'Categories@index');
Route::get('categories/{id}', 'Categories@show');
Route::get('brands', 'Brands@index');
Route::get('brands/{id}', 'Brands@show');
Route::get('productlists', 'ProductLists@index');
Route::get('productlists/{id}', 'ProductLists@show');
Route::get('reviews', 'Reviews@index');
Route::get('reviews/{id}', 'Reviews@show');
Route::group(['middleware' => 'oauth'], function() {
Route::get('cart', 'Cart@index');
Route::post('cart', 'Cart@store');
Route::put('cart', 'Cart@update');
Route::delete('cart/{productId}', 'Cart@destroy');
Route::get('orders', 'Orders@index');
Route::post('orders', 'Orders@store');
Route::get('orders/{id}', 'Orders@show');
Route::put('orders/{id}', 'Orders@update');
});
});
?>