{% for flashMessage in app.session.flashbag.get('error') %}
<script> $(function() { toastr.error("{{ flashMessage }}"); });</script>
{% endfor %}
{% for flashMessage in app.session.flashbag.get('danger') %}
<script>$(function() {toastr.error("{{ flashMessage }}"); });</script>
{% endfor %}
{% for flashMessage in app.session.flashbag.get('success') %}
<script>$(function() {toastr.success("{{ flashMessage }}"); }); </script>
{% endfor %}