This commit is contained in:
Juan Pablo Vial
2023-07-24 20:41:38 -04:00
parent 6ab24c8961
commit be33305cf1
612 changed files with 11436 additions and 107 deletions

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');
?>