Version 3.0
New technologies
This commit is contained in:
@ -1,4 +1,2 @@
|
||||
<?php
|
||||
use Contabilidad\Common\Middleware\Auth;
|
||||
|
||||
$app->add($app->getContainer()->get(Auth::class));
|
||||
$app->add($app->getContainer()->get(Contabilidad\Common\Middleware\Auth::class));
|
||||
|
11
api/setup/middlewares/02_routes.php
Normal file
11
api/setup/middlewares/02_routes.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
$app->addRoutingMiddleware();
|
||||
|
||||
$folder = $app->getContainer()->get('folders')->routes;
|
||||
$files = new DirectoryIterator($folder);
|
||||
foreach ($files as $file) {
|
||||
if ($file->isDir() or $file->getExtension() != 'php') {
|
||||
continue;
|
||||
}
|
||||
include_once $file->getRealPath();
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
<?php
|
||||
use Contabilidad\Common\Middleware\Consolidar;
|
||||
|
||||
$app->add(new Consolidar($app->getContainer()->get(\Contabilidad\Common\Service\Consolidar::class)));
|
2
api/setup/middlewares/99_error_handler.php
Normal file
2
api/setup/middlewares/99_error_handler.php
Normal file
@ -0,0 +1,2 @@
|
||||
<?php
|
||||
$app->add($app->getContainer()->get(Zeuxisoo\Whoops\Slim\WhoopsMiddleware::class));
|
Reference in New Issue
Block a user