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,15 @@
<?php
use Psr\Container\ContainerInterface;
return [
\Whoops\Handler\JsonResponseHandler::class => function(ContainerInterface $container) {
return (new \Whoops\Handler\JsonResponseHandler())
->setJsonApi(true)
->addTraceToOutput(true);
},
\Zeuxisoo\Whoops\Slim\WhoopsMiddleware::class => function(ContainerInterface $container) {
return new \Zeuxisoo\Whoops\Slim\WhoopsMiddleware([], [
$container->get(\Whoops\Handler\JsonResponseHandler::class)
]);
}
];