MicroFrameWork/kernel/modules/option/routs/option.php

19 lines
1.3 KiB
PHP
Raw Normal View History

2024-09-23 15:33:48 +03:00
<?php
use kernel\App;
use Phroute\Phroute\RouteCollector;
2024-09-23 17:03:42 +03:00
App::$collector->group(["prefix" => "admin"], function (RouteCollector $router) {
2024-10-17 16:47:04 +03:00
App::$collector->group(["before" => "auth"], function (RouteCollector $router) {
App::$collector->group(["prefix" => "option"], callback: function (RouteCollector $router) {
App::$collector->get('/', [\kernel\modules\option\controllers\OptionController::class, 'actionIndex']);
App::$collector->get('/page/{page_number}', [\kernel\modules\option\controllers\OptionController::class, 'actionIndex']);
App::$collector->get('/create', [\kernel\modules\option\controllers\OptionController::class, 'actionCreate']);
App::$collector->post("/", [\kernel\modules\option\controllers\OptionController::class, 'actionAdd']);
2024-10-31 16:12:02 +03:00
App::$collector->get('/view/{id}', [\kernel\modules\option\controllers\OptionController::class, 'actionView']);
2024-10-17 16:47:04 +03:00
App::$collector->any('/update/{id}', [\kernel\modules\option\controllers\OptionController::class, 'actionUpdate']);
App::$collector->any("/edit/{id}", [\kernel\modules\option\controllers\OptionController::class, 'actionEdit']);
App::$collector->get('/delete/{id}', [\kernel\modules\option\controllers\OptionController::class, 'actionDelete']);
});
2024-09-23 17:03:42 +03:00
});
2024-09-23 15:33:48 +03:00
});