You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// leafs/session/src/functions.php
if (!function_exists('flash') && class_exists('Leaf\App')) {
/**
* Return flash data/object or set flash data
*
* @param string|null $key — The flash data to set/get
* @param mixed $key — The data to set
*/
function flash($key = null, $value = null)
{
if (!$key && !$value) {
if (!(\Leaf\Config::get("flash.instance"))) {
\Leaf\Config::set("flash.instance", new \Leaf\Flash());
}
return \Leaf\Config::get("flash.instance");
}
if (!$value && is_string($key)) {
return \Leaf\Flash::display($key);
}
return \Leaf\Flash::set($key, $value);
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
so, 'b' is a key, 'a' is a message?
Beta Was this translation helpful? Give feedback.
All reactions