6
0
Fork 0
jiqu-library-server/app/Admin/routes.php

67 lines
2.6 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('adminstrators', 'AdministratorController');
$router->resource('roles', 'RoleController');
$router->resource('permissions', 'RoleController');
$router->resource('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('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}/list', 'ProductSpuController@list')->name('product_spus.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');
/** 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');
});