GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Notizen

Flash messages

Elvis Moraes Englisch 2 Seiten

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
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck