Notizen
Flash messages
Inhalt der Notizen (2)
Seite 1
basic:
Usage on controller
$this->addFlash(
'notice',
'Your changes were saved!'
);
Usage on template (html)
{% for message in app.flashes('notice') %}
<div class="flash-notice">
{{ message }}
</div>
{% endfor %}
Seite 2
Another e.g.
Usage on controller
$this->addFlash(
'warning',
'Your changes NOT saved!'
);
Usage on template (html)
{% for label, messages in app.flashes %}
{% for message in messages %}
<div class="flash-{{ label }}">
{{ message }}
</div>
{% endfor %}
{% endfor %}
Informationen
- Beschreibung
- How to display a Flash Messages on your code.
- Erstellt von
- Elvis Moraes
- Aufrufe
- 43
- Tags
- Bewertung