Skip to content

Commit

Permalink
Merge pull request #61 from chaot1x/master
Browse files Browse the repository at this point in the history
Change alert levels in flash()
  • Loading branch information
JeffreyWay authored Jul 11, 2016
2 parents e7a2abe + e6c8d90 commit 600a814
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Laracasts/Flash/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@
* Arrange for a flash message.
*
* @param string|null $message
* @param string $level
* @return \Laracasts\Flash\FlashNotifier
*/
function flash($message = null)
function flash($message = null, $level = 'info')
{
$notifier = app('flash');

if ( ! is_null($message)) {
return $notifier->info($message);
return $notifier->message($message, $level);
}

return $notifier;
}

}
}

0 comments on commit 600a814

Please sign in to comment.