user crud

This commit is contained in:
2024-07-31 12:59:06 +03:00
parent 0459ed561c
commit be8fea187b
15 changed files with 134 additions and 233 deletions

View File

@ -10,7 +10,7 @@ App::$collector->get('/example', [MainController::class, 'actionExample']);
App::$collector->group(["prefix" => "admin"], function (RouteCollector $router){
App::$collector->group(["prefix" => "user"], callback: function (RouteCollector $router){
App::$collector->get('/', [\app\controllers\UserController::class, 'actionIndex']);
App::$collector->get('/page/{page_id}', [\app\controllers\UserController::class, 'actionIndex']);
App::$collector->get('/page/{page_number}', [\app\controllers\UserController::class, 'actionIndex']);
App::$collector->get('/create', [\app\controllers\UserController::class, 'actionCreate']);
App::$collector->post("/", [\app\controllers\UserController::class, 'actionAdd']);
App::$collector->get('/{id}', [\app\controllers\UserController::class, 'actionView']);