engelsystem/config/routes.php

44 lines
1.3 KiB
PHP
Raw Normal View History

<?php
use FastRoute\RouteCollector;
/** @var RouteCollector $route */
// Pages
2019-06-13 15:18:47 +02:00
$route->get('/', 'HomeController@index');
2018-09-02 02:13:18 +02:00
$route->get('/credits', 'CreditsController@index');
2018-10-25 18:53:05 +02:00
// Authentication
$route->get('/login', 'AuthController@login');
$route->post('/login', 'AuthController@postLogin');
2018-10-25 18:53:05 +02:00
$route->get('/logout', 'AuthController@logout');
2019-10-08 16:17:06 +02:00
// Password recovery
$route->get('/password/reset', 'PasswordResetController@reset');
$route->post('/password/reset', 'PasswordResetController@postReset');
$route->get('/password/reset/{token:.+}', 'PasswordResetController@resetPassword');
$route->post('/password/reset/{token:.+}', 'PasswordResetController@postResetPassword');
// Stats
$route->get('/metrics', 'Metrics\\Controller@metrics');
$route->get('/stats', 'Metrics\\Controller@stats');
// API
$route->get('/api[/{resource:.+}]', 'ApiController@index');
// Administration
$route->addGroup(
'/admin',
function (RouteCollector $route) {
// Schedule
$route->addGroup(
'/schedule',
function (RouteCollector $route) {
$route->get('', 'Admin\\Schedule\\ImportSchedule@index');
$route->post('/load', 'Admin\\Schedule\\ImportSchedule@loadSchedule');
$route->post('/import', 'Admin\\Schedule\\ImportSchedule@importSchedule');
}
);
}
);