{% if app.session.flashbag.peekAll()|length > 0 %} {% for message in app.flashes('success') %} {% endfor %} {% for message in app.flashes('danger') %} {% endfor %} {% for message in app.flashes('warning') %} {% endfor %} {% for message in app.flashes('info') %} {% endfor %} {% endif %}