<?php

use App\Admin\Controllers\DistAppearanceTemplateController;
use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;
use Dcat\Admin\Admin;

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('test', 'TestController');
    //产品
    $router->get('base-product/parameter', 'BaseProductController@parameter');
    $router->resource('base-product', 'BaseProductController');
    //分类
    $router->resource('product-category', 'BaseProductCategoryController');
    //参数
    $router->resource('product-parameter', 'BaseProductParameterController');
    //视频分类
    $router->resource('video-category', 'BaseVideoCategoryController');
    //视频管理
    $router->resource('base-video', 'BaseVideoController');
    //分销商管理
    $router->resource('dist-admin-distributor', 'DistAdminDistributorController');
    //分销商用户管理
    $router->resource('dist-admin-user', 'DistAdminUserController');
    //询价管理
    $router->resource('dist-inquiry', 'DistInquiryController');
    //外观管理
    $router->resource('dist-appearance', 'DistAppearanceController');
    //模板管理
    $router->any('dist-template/ace', [DistAppearanceTemplateController::class, 'ace']);
    //模板变量
    $router->resource('dist-template-var', 'DistAppearanceVariableController');
});
