This repository has been archived on 2024-07-18. You can view files and clone it, but cannot push or open issues or pull requests.
slim/app/middleware.php
2023-03-09 16:42:07 -08:00

17 lines
361 B
PHP

<?php //middleware
use Slim\App;
return function(App $app) {
$setting = $app->getContainer()->get('settings');
$app->addErrorMiddleware(
$setting['displayErrorDetails'],
$setting['logErrors'],
$setting['logErrorDetails']
);
// Add Twig-View Middleware
$app->add(TwigMiddleware::createFromContainer($app));
};