17 lines
543 B
PHP
17 lines
543 B
PHP
<?php
|
|
use Incoviba\Controller\Inmobiliarias;
|
|
|
|
$app->group('/inmobiliarias', function($app) {
|
|
$folder = implode(DIRECTORY_SEPARATOR, [__DIR__, 'inmobiliarias']);
|
|
if (file_exists($folder)) {
|
|
$files = new FilesystemIterator($folder);
|
|
foreach ($files as $file) {
|
|
if ($file->isDir()) {
|
|
continue;
|
|
}
|
|
include_once $file->getRealPath();
|
|
}
|
|
}
|
|
$app->get('[/]', Inmobiliarias::class);
|
|
})->add($app->getContainer()->get(Incoviba\Middleware\Authentication::class));
|