backend/app/modules/slider/routs/slider.php
2024-12-03 16:16:36 +03:00

20 lines
1.3 KiB
PHP

<?php
use kernel\App;
use kernel\CgRouteCollector;
use Phroute\Phroute\RouteCollector;
App::$collector->group(["prefix" => "admin"], function (CgRouteCollector $router) {
App::$collector->group(["before" => "auth"], function (RouteCollector $router) {
App::$collector->group(["prefix" => "slider"], function (CGRouteCollector $router) {
App::$collector->get('/', [\app\modules\slider\controllers\SliderController::class, 'actionIndex']);
App::$collector->get('/page/{page_number}', [\app\modules\slider\controllers\SliderController::class, 'actionIndex']);
App::$collector->get('/create', [\app\modules\slider\controllers\SliderController::class, 'actionCreate']);
App::$collector->post("/", [\app\modules\slider\controllers\SliderController::class, 'actionAdd']);
App::$collector->get('/view/{id}', [\app\modules\slider\controllers\SliderController::class, 'actionView']);
App::$collector->any('/update/{id}', [\app\modules\slider\controllers\SliderController::class, 'actionUpdate']);
App::$collector->any("/edit/{id}", [\app\modules\slider\controllers\SliderController::class, 'actionEdit']);
App::$collector->get('/delete/{id}', [\app\modules\slider\controllers\SliderController::class]);
});
});
});