Skip to content

Instantly share code, notes, and snippets.

@marydn
Created January 14, 2014 18:30
Show Gist options
  • Save marydn/8423187 to your computer and use it in GitHub Desktop.
Save marydn/8423187 to your computer and use it in GitHub Desktop.
Render all flash messages from Symfony in Twig.
{% for label, flashes in app.session.flashbag.all %}
{% for flash in flashes %}
<div class="alert alert-{{ label }}">
{{ flash }}
</div>
{% endfor %}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment