This commit is contained in:
2020-12-01 17:23:13 -03:00
parent 09e8c226bb
commit 9852a8cbdc
274 changed files with 24706 additions and 0 deletions

21
bootstrap/routes.php Normal file
View File

@ -0,0 +1,21 @@
<?php
use App\Contract\Route;
use Stringy\Stringy;
/*
* TODO: Language Changer
* Route::add('GET', 'change_language', function() {
\App\Contract\Session::set('App', 'lang', get('lang'));
header('Location: .');
});*/
$controllers = glob(config('locations.controllers') . '/*.php');
foreach ($controllers as $controller) {
$info = pathinfo($controller);
$name = $info['filename'];
$route = '' . Stringy::create($name)->underscored();
Route::add(['GET', 'POST'], $route, $name);
}
Route::add(['GET', 'POST'], 'buscar', 'Buscar');
?>