Flash messages

Beschreibung

How to display a Flash Messages on your code.
Elvis Moraes
Notiz von Elvis Moraes, aktualisiert more than 1 year ago
Elvis Moraes
Erstellt von Elvis Moraes vor etwa 5 Jahre
7
0

Zusammenfassung der Ressource

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 %}

Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

Health & Safety Signs
Oliver Balay
Poetic Devices
erinpalmer
GCSE Business Key Terms
ChrisDev
GCSE Computing : OCR Computing
Samuel Wooster
MCO population
zachary.frechett
Computer Networks Flashcards
Joel Smith
Do you know Happy Wheels ?
Apotheose
Power in DC Circuits (Mod.2 Sect.2 part3)
That Yeti Dog Person
Calculating Circuit Resistance (Mod.2 sect.2 part1) 1 of 2
That Yeti Dog Person
Ohm's Law -REVIEW SECTION- (Mod.2 Sect.2 part2)
That Yeti Dog Person
Relative Conductivity of Metals at 20 Degrees Celsius
That Yeti Dog Person