GoConqr has a new look! Let us know what you think.

Notes

Flash messages

Elvis Moraes English 2 pages

Content of the notes (2)

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

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

Information

Description
How to display a Flash Messages on your code.
Created by
Elvis Moraes
Views
43
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?