2024-09-03 16:29:44 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use app\controllers\MainController;
|
|
|
|
use kernel\App;
|
|
|
|
use kernel\modules\admin_themes\controllers\AdminThemeController;
|
|
|
|
use Phroute\Phroute\RouteCollector;
|
|
|
|
|
|
|
|
|
|
|
|
App::$collector->group(["prefix" => "admin"], function (RouteCollector $router){
|
2024-09-12 16:01:04 +03:00
|
|
|
App::$collector->group(["prefix" => "module"], function (RouteCollector $router){
|
|
|
|
App::$collector->get('/', [\kernel\controllers\ModuleController::class, 'actionIndex']);
|
2024-09-13 13:54:58 +03:00
|
|
|
App::$collector->get('/activate', [\kernel\controllers\ModuleController::class, 'actionActivate']);
|
2024-09-12 16:01:04 +03:00
|
|
|
});
|
2024-09-03 16:29:44 +03:00
|
|
|
App::$collector->group(["prefix" => "post"], function (RouteCollector $router){
|
2024-09-06 16:53:20 +03:00
|
|
|
App::$collector->get('/', [\kernel\modules\post\controllers\PostController::class, 'actionIndex']);
|
|
|
|
App::$collector->get('/page/{page_number}', [\kernel\modules\post\controllers\PostController::class, 'actionIndex']);
|
|
|
|
App::$collector->get('/create', [\kernel\modules\post\controllers\PostController::class, 'actionCreate']);
|
|
|
|
App::$collector->post("/", [\kernel\modules\post\controllers\PostController::class, 'actionAdd']);
|
|
|
|
App::$collector->get('/{id}', [\kernel\modules\post\controllers\PostController::class, 'actionView']);
|
|
|
|
App::$collector->any('/update/{id}', [\kernel\modules\post\controllers\PostController::class, 'actionUpdate']);
|
|
|
|
App::$collector->any("/edit/{id}", [\kernel\modules\post\controllers\PostController::class, 'actionEdit']);
|
|
|
|
App::$collector->get('/delete/{id}', [\kernel\modules\post\controllers\PostController::class, 'actionDelete']);
|
2024-09-03 16:29:44 +03:00
|
|
|
});
|
2024-09-12 16:01:04 +03:00
|
|
|
App::$collector->group(["prefix" => "user"], callback: function (RouteCollector $router){
|
|
|
|
App::$collector->get('/', [\kernel\modules\user\controllers\UserController::class, 'actionIndex']);
|
|
|
|
App::$collector->get('/page/{page_number}', [\kernel\modules\user\controllers\UserController::class, 'actionIndex']);
|
|
|
|
App::$collector->get('/create', [\kernel\modules\user\controllers\UserController::class, 'actionCreate']);
|
|
|
|
App::$collector->post("/", [\kernel\modules\user\controllers\UserController::class, 'actionAdd']);
|
|
|
|
App::$collector->get('/{id}', [\kernel\modules\user\controllers\UserController::class, 'actionView']);
|
|
|
|
App::$collector->any('/update/{id}', [\kernel\modules\user\controllers\UserController::class, 'actionUpdate']);
|
|
|
|
App::$collector->any("/edit/{id}", [\kernel\modules\user\controllers\UserController::class, 'actionEdit']);
|
|
|
|
App::$collector->get('/delete/{id}', [\kernel\modules\user\controllers\UserController::class, 'actionDelete']);
|
|
|
|
});
|
2024-09-03 16:29:44 +03:00
|
|
|
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']);
|
|
|
|
});
|
|
|
|
App::$collector->group(["prefix" => "admin-themes"], function (RouteCollector $router){
|
|
|
|
App::$collector->get('/', [AdminThemeController::class, 'actionIndex']);
|
|
|
|
App::$collector->get('/activate', [AdminThemeController::class, 'actionActivate']);
|
|
|
|
// 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']);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|