20 lines
1.3 KiB
PHP
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" => "photo"], function (CGRouteCollector $router) {
|
||
|
App::$collector->get('/', [\kernel\app_modules\photo\controllers\PhotoController::class, 'actionIndex']);
|
||
|
App::$collector->get('/page/{page_number}', [\kernel\app_modules\photo\controllers\PhotoController::class, 'actionIndex']);
|
||
|
App::$collector->get('/create', [\kernel\app_modules\photo\controllers\PhotoController::class, 'actionCreate']);
|
||
|
App::$collector->post("/", [\kernel\app_modules\photo\controllers\PhotoController::class, 'actionAdd']);
|
||
|
App::$collector->get('/view/{id}', [\kernel\app_modules\photo\controllers\PhotoController::class, 'actionView']);
|
||
|
App::$collector->any('/update/{id}', [\kernel\app_modules\photo\controllers\PhotoController::class, 'actionUpdate']);
|
||
|
App::$collector->any("/edit/{id}", [\kernel\app_modules\photo\controllers\PhotoController::class, 'actionEdit']);
|
||
|
App::$collector->get('/delete/{id}', [\kernel\app_modules\photo\controllers\PhotoController::class]);
|
||
|
});
|
||
|
});
|
||
|
});
|