filter('bearer', [\kernel\modules\secure\middlewares\BearerAuthMiddleware::class, "handler"]); App::$collector->group(["prefix" => "admin"], function (CgRouteCollector $router) { App::$collector->group(["prefix" => "module_shop"], function (CgRouteCollector $router) { App::$collector->get('/', [\app\modules\module_shop\controllers\ModuleShopController::class, 'actionIndex']); App::$collector->get('/page/{page_number}', [\app\modules\module_shop\controllers\ModuleShopController::class, 'actionIndex']); App::$collector->get('/view/{id}', [\app\modules\module_shop\controllers\ModuleShopController::class, 'actionView']); App::$collector->any('/update/{id}', [\app\modules\module_shop\controllers\ModuleShopController::class, 'actionUpdate']); App::$collector->any("/edit/{id}", [\app\modules\module_shop\controllers\ModuleShopController::class, 'actionEdit']); App::$collector->get('/delete/{id}', [\app\modules\module_shop\controllers\ModuleShopController::class, 'actionDelete']); App::$collector->get('/pack/{id}', [\app\modules\module_shop\controllers\ModuleShopController::class, 'actionPack']); App::$collector->group(["prefix" => "module"], function (CgRouteCollector $router) { App::$collector->get('/create', [\app\modules\module_shop\controllers\ModuleShopController::class, 'actionCreate']); App::$collector->post("/", [\app\modules\module_shop\controllers\ModuleShopController::class, 'actionAdd']); }); App::$collector->group(["prefix" => "kernel"], function (CgRouteCollector $router) { App::$collector->get('/create', [\app\modules\module_shop\controllers\KernelShopController::class, 'actionCreate']); App::$collector->post("/", [\app\modules\module_shop\controllers\KernelShopController::class, 'actionAdd']); }); App::$collector->group(["prefix" => "admin_theme"], function (CgRouteCollector $router) { App::$collector->get('/create', [\app\modules\module_shop\controllers\AdminThemeShopController::class, 'actionCreate']); App::$collector->post("/", [\app\modules\module_shop\controllers\AdminThemeShopController::class, 'actionAdd']); }); }); }); App::$collector->group(["prefix" => "api"], function (CgRouteCollector $router) { App::$collector->group(['before' => 'bearer'], function (CgRouteCollector $router) { App::$collector->group(["prefix" => "module_shop"], function (CgRouteCollector $router) { App::$collector->get('/gb_slug', [\app\modules\module_shop\controllers\ModuleShopRestController::class, 'actionIndexGroupBySlug']); App::$collector->get('/install/{id}', [\app\modules\module_shop\controllers\ModuleShopRestController::class, 'actionInstall']); App::$collector->group(["prefix" => "kernel"], function (CgRouteCollector $router) { App::$collector->get('/update/{id}', [\app\modules\module_shop\controllers\KernelShopRestController::class, 'actionUpdate']); }); }); $router->rest("module_shop", [\app\modules\module_shop\controllers\ModuleShopRestController::class]); }); });