17 lines
361 B
PHP
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));
|
|
|
|
};
|