You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
495 B
21 lines
495 B
<?php
|
|
|
|
/**
|
|
* Function helper to add flash notification.
|
|
*
|
|
* @param null|string $message The flashed message.
|
|
* @param string $level Level/type of message
|
|
* @return void
|
|
*/
|
|
function flash($message = null, $level = 'info')
|
|
{
|
|
$session = app('session');
|
|
if ($level == 'info') {
|
|
$level = 'information';
|
|
}
|
|
|
|
if (!is_null($message)) {
|
|
$session->flash('flash_notification.message', $message);
|
|
$session->flash('flash_notification.level', $level);
|
|
}
|
|
}
|