Basic resources

This commit is contained in:
2020-12-15 17:45:45 -03:00
parent 6c945e915f
commit acde7a5023
9 changed files with 65 additions and 0 deletions

16
resources/routes/web.php Normal file
View File

@ -0,0 +1,16 @@
<?php
use ProVM\Common\Helper\Merger;
use Incoviba\Control\Common\Controller\Home;
$folder = (new Merger(DIRECTORY_SEPARATOR))->add(__DIR__)->add($__environment)->merge();
if (file_exists($folder)) {
$files = new DirectoryIterator($folder);
foreach ($files as $file) {
if ($file->isDir() or $file->getExtension() != 'php') {
continue;
}
include_once $file->getRealPath();
}
}
$app->get('/', Home::class);