Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 185e886 commit 8ac43caCopy full SHA for 8ac43ca
controller.rst
@@ -427,14 +427,14 @@ read any flash messages from the session:
427
{# app/Resources/views/base.html.twig #}
428
429
{# you can read and display just one flash message type... #}
430
- {% for flash_message in app.session.flash('notice') %}
+ {% for flash_message in app.session.flashBag.get('notice') %}
431
<div class="flash-notice">
432
{{ flash_message }}
433
</div>
434
{% endfor %}
435
436
{# ...or you can read and display every flash message available #}
437
- {% for type, flash_messages in app.session.flashes %}
+ {% for type, flash_messages in app.session.flashBag.all %}
438
{% for flash_message in flash_messages %}
439
<div class="flash-{{ type }}">
440
0 commit comments