91 lines
3.9 KiB
PHP
91 lines
3.9 KiB
PHP
<?php
|
|
|
|
use Dcat\Admin\Admin;
|
|
use Illuminate\Routing\Router;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
Admin::routes();
|
|
|
|
Route::group([
|
|
'prefix' => config('admin.route.prefix'),
|
|
'namespace' => config('admin.route.namespace'),
|
|
'middleware' => config('admin.route.middleware'),
|
|
], function (Router $router) {
|
|
$router->get('/', 'HomeController@index');
|
|
$router->resource('auth/users', 'AdministratorController')->names('administrators');
|
|
$router->resource('auth/roles', 'RoleController');
|
|
$router->resource('auth/permissions', 'RoleController');
|
|
$router->resource('auth/menus', 'MenuController');
|
|
|
|
$router->resource('ad-addresses', 'AdAddressController')->only([
|
|
'index', 'create', 'store', 'edit', 'update', 'destroy',
|
|
])->names('ad_addresses');
|
|
|
|
$router->resource('ads', 'AdController')->only([
|
|
'index', 'create', 'store', 'edit', 'update', 'destroy',
|
|
]);
|
|
|
|
$router->resource('article-categories', 'ArticleCategoryController')->only([
|
|
'index', 'create', 'store', 'edit', 'update', 'destroy',
|
|
])->names('article_categories');
|
|
|
|
$router->resource('articles', 'ArticleController');
|
|
|
|
$router->resource('shipping-templates', 'ShippingTemplateController')->names('shipping_templates');
|
|
$router->get('shipping-templates/{template}/rule-list', 'ShippingTemplateController@ruleList')->name('shipping_templates.rule_list');
|
|
$router->resource('shipping-rules', 'ShippingRuleController')->only([
|
|
'create', 'store', 'edit', 'update', 'destroy',
|
|
])->names('shipping_rules');
|
|
|
|
$router->resource('product-categories', 'ProductCategoryController')->only([
|
|
'index', 'create', 'store', 'edit', 'update', 'destroy',
|
|
])->names('product_categories');
|
|
|
|
$router->resource('product-groups', 'ProductGroupController')->only([
|
|
'index', 'create', 'store', 'edit', 'update', 'destroy',
|
|
])->names('product_groups');
|
|
|
|
$router->resource('product-features', 'ProductFeatureController')->only([
|
|
'index', 'create', 'store', 'edit', 'update', 'destroy',
|
|
])->names('product_features');
|
|
|
|
$router->resource('product-buynotes', 'ProductBuynoteController')->only([
|
|
'index', 'create', 'store', 'edit', 'update', 'destroy',
|
|
])->names('product_buynotes');
|
|
|
|
$router->resource('product-spus', 'ProductSpuController')->names('product_spus');
|
|
$router->get('product-spus/{spu}/sku-list', 'ProductSpuController@skuList')->name('product_spus.sku_list');
|
|
|
|
$router->resource('product-skus', 'ProductSkuController')->only([
|
|
'index', 'edit', 'update', 'destroy',
|
|
])->names('product_skus');
|
|
|
|
$router->resource('product-sku-verifies', 'ProductSkuVerifyController')->only([
|
|
'index', 'edit', 'update', 'destroy',
|
|
])->names('product_sku_verifies');
|
|
|
|
$router->resource('product-parts', 'ProductPartController')->only([
|
|
'index', 'create', 'store', 'edit', 'update', 'destroy',
|
|
])->names('product_parts');
|
|
|
|
$router->resource('coupons', 'CouponController')->names('coupons');
|
|
$router->get('coupons/{coupon}/range-list', 'CouponController@rangeList')->name('coupons.range_list');
|
|
$router->resource('coupon-ranges', 'CouponRangeController')->only([
|
|
'create', 'store', 'edit', 'update', 'destroy',
|
|
])->names('coupon_ranges');
|
|
|
|
$router->resource('coupon-send-tasks', 'CouponSendTaskController')->names('coupon_send_tasks');
|
|
$router->resource('coupon-task-logs', 'CouponTaskLogController')->only([
|
|
'index',
|
|
])->names('coupon_task_logs');
|
|
|
|
$router->resource('users', 'UserController');
|
|
|
|
$router->resource('vips', 'VipController');
|
|
|
|
/** api接口 **/
|
|
$router->get('api/product-categories', 'ProductCategoryController@categories')->name('api.product_categories');
|
|
$router->get('api/product-group-details', 'ProductGroupController@details')->name('api.product_group_details');
|
|
$router->get('api/product-skus', 'ProductSkuController@skus')->name('api.product_skus');
|
|
});
|