Skip to content

Controller

flash()

flash() — returns any

Available in: controller Category: Flash Functions

Returns the value of a specific key in the Flash (or the entire Flash as a struct if no key is passed in).

NameTypeRequiredDefaultDescription
keystringnoThe key to get the value for.
// Get the current value of notice in the Flash
notice = flash("notice");

// Get the entire Flash as a struct
flashContents = flash();