2023-07-24 20:55:26 -04:00
|
|
|
<?php
|
|
|
|
use Incoviba\Controller\Proyectos;
|
|
|
|
|
|
|
|
$app->group('/proyectos', function($app) {
|
2025-07-22 13:18:00 +00:00
|
|
|
$folder = implode(DIRECTORY_SEPARATOR, [__DIR__, 'proyectos']);
|
|
|
|
if (file_exists($folder)) {
|
|
|
|
$files = new FilesystemIterator($folder);
|
|
|
|
foreach ($files as $file) {
|
|
|
|
if ($file->isDir()) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
include_once $file->getRealPath();
|
|
|
|
}
|
|
|
|
}
|
2023-10-13 10:45:21 -03:00
|
|
|
$app->get('/unidades[/]', [Proyectos::class, 'unidades']);
|
2023-07-24 20:55:26 -04:00
|
|
|
$app->get('[/]', Proyectos::class);
|
2023-11-25 00:55:31 -03:00
|
|
|
})->add($app->getContainer()->get(Incoviba\Middleware\Authentication::class));
|
2023-10-20 19:03:29 -03:00
|
|
|
$app->group('/proyecto/{proyecto_id}', function($app) {
|
|
|
|
$app->get('[/]', [Proyectos::class, 'show']);
|
2023-11-25 00:55:31 -03:00
|
|
|
})->add($app->getContainer()->get(Incoviba\Middleware\Authentication::class));
|