engelsystem/config/routes.php

20 lines
495 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');
// Stats
$route->get('/metrics', 'Metrics\\Controller@metrics');
$route->get('/stats', 'Metrics\\Controller@stats');
// API
$route->get('/api[/{resource:.+}]', 'ApiController@index');