2024-10-15 17:32:33 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use kernel\App;
|
|
|
|
use kernel\CgRouteCollector;
|
|
|
|
|
|
|
|
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']);
|
2024-10-16 16:06:25 +03:00
|
|
|
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->get('/{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']);
|
2024-10-15 17:32:33 +03:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
App::$collector->group(["prefix" => "api"], function (CgRouteCollector $router){
|
|
|
|
$router->rest("module_shop", [\app\modules\module_shop\controllers\ModuleShopController::class]);
|
|
|
|
});
|