Files
oficial/app/resources/routes/01_api.php

17 lines
498 B
PHP
Raw Normal View History

<?php
2024-03-20 23:07:49 -03:00
use Incoviba\Controller\API\Base;
$app->group('/api', function($app) {
$folder = implode(DIRECTORY_SEPARATOR, [__DIR__, 'api']);
if (file_exists($folder)) {
$files = new FilesystemIterator($folder);
foreach ($files as $file) {
if ($file->isDir()) {
continue;
}
include_once $file->getRealPath();
}
}
2024-03-20 23:07:49 -03:00
$app->get('[/]', Base::class);
2023-11-25 00:55:31 -03:00
})->add($app->getContainer()->get(Incoviba\Middleware\API::class));