engelsystem/config/routes.php

23 lines
563 B
PHP
Raw Normal View History

<?php
2018-11-21 12:17:28 +01:00
use Engelsystem\Http\Exceptions\HttpTemporaryRedirect;
use FastRoute\RouteCollector;
/** @var RouteCollector $route */
// Pages
2018-11-21 12:17:28 +01:00
$route->get('/', function () {
throw new HttpTemporaryRedirect(auth()->user() ? config('home_site') : 'login');
});
2018-09-02 02:13:18 +02:00
$route->get('/credits', 'CreditsController@index');
2018-10-25 18:53:05 +02:00
// Authentication
$route->get('/logout', 'AuthController@logout');
// Stats
$route->get('/metrics', 'Metrics\\Controller@metrics');
$route->get('/stats', 'Metrics\\Controller@stats');
// API
$route->get('/api[/{resource:.+}]', 'ApiController@index');