Fix the flash messages
This commit is contained in:
parent
be92fda17b
commit
b88d99196d
@ -49,7 +49,6 @@ class Middlewares
|
||||
/** @var SessionInterface $session */
|
||||
$session = $container->get(SessionInterface::class);
|
||||
$twig->getEnvironment()->addGlobal('session', $session);
|
||||
$twig->getEnvironment()->addGlobal('flash', $session->getFlash());
|
||||
|
||||
$app->add(TwigMiddleware::create($app, $twig));
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
{% for level, message in flash.all() %}
|
||||
{% for level, messages in session.getFlash().all() %}
|
||||
<div class="flash {{ level }}" role="alert">
|
||||
{{ message }}
|
||||
{% for message in messages %}
|
||||
<div>{{ message }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
Loading…
Reference in New Issue
Block a user