API Base App

This commit is contained in:
2022-11-09 15:20:04 -03:00
parent 1cf5a1f094
commit 0fbf73b3fd
19 changed files with 267 additions and 0 deletions

View File

@ -0,0 +1,11 @@
<?php
$app->addRoutingMiddleware();
$folder = $app->getContainer()->get('routes_folder');
$files = new FilesystemIterator($folder);
foreach ($files as $file) {
if ($file->isDir()) {
continue;
}
include_once $file->getRealPath();
}

View File

@ -0,0 +1,2 @@
<?php
$app->add($app->getContainer()->get(\ProVM\Common\Middleware\CORS::class));

View File

@ -0,0 +1,2 @@
<?php
$app->add($app->getContainer()->get(\ProVM\Common\Middleware\Auth::class));

View File

@ -0,0 +1,2 @@
<?php
$app->add($app->getContainer()->get(\Zeuxisoo\Whoops\Slim\WhoopsMiddleware::class));