igfs/kernel/routs/admin.php
2024-10-23 16:16:47 +03:00

19 lines
1.1 KiB
PHP

<?php
use kernel\App;
use Phroute\Phroute\RouteCollector;
App::$collector->filter("auth", [\kernel\middlewares\AuthMiddleware::class, "handler"]);
App::$collector->group(["prefix" => "admin"], function (RouteCollector $router){
App::$collector->group(["before" => "auth"], function (RouteCollector $router){
App::$collector->group(["prefix" => "module"], function (RouteCollector $router){
App::$collector->get('/', [\kernel\controllers\ModuleController::class, 'actionIndex']);
App::$collector->get('/page/{page_number}', [\kernel\controllers\ModuleController::class, 'actionIndex']);
App::$collector->get('/activate', [\kernel\controllers\ModuleController::class, 'actionActivate']);
App::$collector->get('/deactivate', [\kernel\controllers\ModuleController::class, 'actionDeactivate']);
App::$collector->get('/view', [\kernel\controllers\ModuleController::class, 'actionView']);
App::$collector->get('/update', [\kernel\controllers\ModuleController::class, 'actionUpdate']);
});
});
});