diff --git a/app/src/Middlewares.php b/app/src/Middlewares.php index 7d27182..bb1575d 100644 --- a/app/src/Middlewares.php +++ b/app/src/Middlewares.php @@ -42,8 +42,10 @@ class Middlewares // Add the global variables $twig->getEnvironment()->addGlobal('site_name', $config->get('site.name')); $twig->getEnvironment()->addGlobal('site_description', $config->get('site.description')); + $flash = $container->get(SessionInterface::class)->getFlash(); $twig->getEnvironment()->addGlobal('flash', $flash); + $app->add(TwigMiddleware::create($app, $twig)); // Add the error handling middleware