-
Notifications
You must be signed in to change notification settings - Fork 169
/
web.php
67 lines (55 loc) · 3.48 KB
/
web.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
Route::get('/', function () {
return view('welcome');
});
// Admin Interface
Route::group(['middleware' => 'admin',
'prefix' => 'admin',
'namespace' => 'Admin'
], function () {
CRUD::resource('categories', 'CategoryCrudController');
CRUD::resource('currencies', 'CurrencyCrudController');
CRUD::resource('carriers', 'CarrierCrudController');
CRUD::resource('attributes', 'AttributeCrudController');
CRUD::resource('attributes-sets', 'AttributeSetCrudController');
CRUD::resource('products', 'ProductCrudController');
CRUD::resource('taxes', 'TaxCrudController');
CRUD::resource('orders', 'OrderCrudController');
CRUD::resource('order-statuses', 'OrderStatusCrudController');
CRUD::resource('clients', 'ClientCrudController');
CRUD::resource('users', 'UserCrudController');
CRUD::resource('cart-rules', 'CartRuleCrudController');
CRUD::resource('specific-prices', 'SpecificPriceCrudController');
CRUD::resource('notification-templates', 'NotificationTemplateCrudController');
// Clone Products
Route::post('products/clone', ['as' => 'clone.product', 'uses' => 'ProductCrudController@cloneProduct']);
// Update Order Status
Route::post('orders/update-status', ['as' => 'updateOrderStatus', 'uses' => 'OrderCrudController@updateStatus']);
});
// Ajax
Route::group(['middleware' => 'admin',
'prefix' => 'ajax',
'namespace' => 'Admin'
], function() {
// Get attributes by set id
Route::post('attribute-sets/list-attributes', ['as' => 'getAttrBySetId', 'uses' => 'AttributeSetCrudController@ajaxGetAttributesBySetId']);
// Product images upload routes
Route::post('product/image/upload', ['as' => 'uploadProductImages', 'uses' => 'ProductCrudController@ajaxUploadProductImages']);
Route::post('product/image/reorder', ['as' => 'reorderProductImages', 'uses' => 'ProductCrudController@ajaxReorderProductImages']);
Route::post('product/image/delete', ['as' => 'deleteProductImage', 'uses' => 'ProductCrudController@ajaxDeleteProductImage']);
// Get group products by group id
Route::post('product-group/list/products', ['as' => 'getGroupProducts', 'uses' => 'ProductGroupController@getGroupProducts']);
Route::post('product-group/list/ungrouped-products', ['as' => 'getUngroupedProducts', 'uses' => 'ProductGroupController@getUngroupedProducts']);
Route::post('product-group/add/product', ['as' => 'addProductToGroup', 'uses' => 'ProductGroupController@addProductToGroup']);
Route::post('product-group/remove/product', ['as' => 'removeProductFromGroup', 'uses' => 'ProductGroupController@removeProductFromGroup']);
// Client address
Route::post('client/list/addresses', ['as' => 'getClientAddresses', 'uses' => 'ClientAddressController@getClientAddresses']);
Route::post('client/add/address', ['as' => 'addClientAddress', 'uses' => 'ClientAddressController@addClientAddress']);
Route::post('client/delete/address', ['as' => 'deleteClientAddress', 'uses' => 'ClientAddressController@deleteClientAddress']);
// Client company
Route::post('client/list/companies', ['as' => 'getClientCompanies', 'uses' => 'ClientCompanyController@getClientCompanies']);
Route::post('client/add/company', ['as' => 'addClientCompany', 'uses' => 'ClientCompanyController@addClientCompany']);
Route::post('client/delete/company', ['as' => 'deleteClientCompany', 'uses' => 'ClientCompanyController@deleteClientCompany']);
// Notification templates
Route::post('notification-templates/list-model-variables', ['as' => 'listModelVars', 'uses' => 'NotificationTemplateCrudController@listModelVars']);
});