2020-05-26 23:04:49 -04:00
|
|
|
<?php
|
2020-05-27 17:49:12 -04:00
|
|
|
use ProVM\KI\Common\Controller\Web\Admin\Home;
|
|
|
|
|
2020-05-26 23:04:49 -04:00
|
|
|
$app->group('/admin', function($app) {
|
|
|
|
$folder = implode(DIRECTORY_SEPARATOR, [
|
|
|
|
__DIR__,
|
|
|
|
'admin'
|
|
|
|
]);
|
|
|
|
if (file_exists($folder)) {
|
|
|
|
$files = new DirectoryIterator($folder);
|
|
|
|
foreach ($files as $file) {
|
|
|
|
if ($file->isDir()) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
include_once $file->getRealPath();
|
|
|
|
}
|
|
|
|
}
|
2020-05-27 17:49:12 -04:00
|
|
|
$app->get('[/]', Home::class);
|
2020-05-26 23:04:49 -04:00
|
|
|
});
|