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

17 lines
361 B
PHP
Raw Permalink Normal View History

2023-03-10 00:42:07 +00:00
<?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));
};