igfs/app/modules/module_shop/routs/ms.php
2024-10-15 17:32:33 +03:00

21 lines
1.4 KiB
PHP

<?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']);
// App::$collector->get('/create', [\kernel\modules\menu\controllers\MenuController::class, 'actionCreate']);
// App::$collector->post("/", [\kernel\modules\menu\controllers\MenuController::class, 'actionAdd']);
// App::$collector->get('/{id}', [\kernel\modules\menu\controllers\MenuController::class, 'actionView']);
// App::$collector->any('/update/{id}', [\kernel\modules\menu\controllers\MenuController::class, 'actionUpdate']);
// App::$collector->any("/edit/{id}", [\kernel\modules\menu\controllers\MenuController::class, 'actionEdit']);
// App::$collector->get('/delete/{id}', [\kernel\modules\menu\controllers\MenuController::class, 'actionDelete']);
});
});
App::$collector->group(["prefix" => "api"], function (CgRouteCollector $router){
$router->rest("module_shop", [\app\modules\module_shop\controllers\ModuleShopController::class]);
});