MicroFrameWork/kernel/modules/menu/routs/menu.php
2024-09-18 13:48:12 +03:00

19 lines
1.3 KiB
PHP

<?php
use kernel\App;
use Phroute\Phroute\RouteCollector;
App::$collector->group(["prefix" => "admin"], function (RouteCollector $router) {
App::$collector->group(["prefix" => "settings"], function (RouteCollector $router){
App::$collector->group(["prefix" => "menu"], function (RouteCollector $router){
App::$collector->get('/', [\kernel\modules\menu\controllers\MenuController::class, 'actionIndex']);
App::$collector->get('/page/{page_number}', [\kernel\modules\menu\controllers\MenuController::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']);
});
});
});