laracasts/flash
Simple flash messaging for Laravel apps by Laracasts. Easily set session-based success, info, warning, and error messages and display them in your views with a clean API and customizable templates. Great for notifications after redirects.
flash('Message 1');
flash('Message 2')->warning();
flash('Message 3')->important();
// Before
flash()->success('My message');
// After
flash('My message')->success();
// Before
flash()->overlay('My message');
// After
flash('My message')->overlay();
Please note that there are no breaking changes with v3, unless you published our old view templates to your project.
flash_notification array to the session, and nothing else. As such, if maintaining your own views, you'll need to update them accordingly. See here: https://github.com/laracasts/flash/blob/master/src/views/message.blade.phpMost important is that this package no longer adds the dismissable "x" by default. To mark a flash message as important, call the important method, like this:
flash('This is important')->important();
With this update, the default action is to not display the "X". Instead, you might write a quick bit of JavaScript to automatically fade out the flash message, after a few seconds or so.
Laravel 5 support.
How can I help you explore Laravel packages today?