MicroFrameWork/kernel/modules/secure/routs/secure.php

17 lines
765 B
PHP
Raw Normal View History

2024-09-25 14:17:36 +03:00
<?php
use kernel\App;
use Phroute\Phroute\RouteCollector;
2024-10-17 14:55:00 +03:00
App::$collector->filter("auth", [\kernel\middlewares\AuthMiddleware::class, "handler"]);
2024-09-25 14:17:36 +03:00
App::$collector->group(["prefix" => "admin"], function (RouteCollector $router){
App::$collector->group(["before" => "auth"], function (RouteCollector $router){
App::$collector->get('/', [\kernel\controllers\ModuleController::class, 'actionIndex']);
});
App::$collector->get('/login', [\kernel\modules\secure\controllers\SecureController::class, 'actionLogin']);
App::$collector->get('/logout', [\kernel\modules\secure\controllers\SecureController::class, 'actionLogout']);
App::$collector->post('/auth', [\kernel\modules\secure\controllers\SecureController::class, 'actionAuth']);
2024-10-17 14:55:00 +03:00
});