balfour / laravel-flash-messages
A super lightweight library for handling flash messages in Laravel
Installs: 25
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 6
Forks: 0
Open Issues: 0
pkg:composer/balfour/laravel-flash-messages
Requires
- illuminate/session: ^5.7
This package is auto-updated.
Last update: 2025-09-25 01:36:31 UTC
README
A super lightweight library for handling flash messages in Laravel.
This library is in early release and is pending unit tests.
Installation
composer require balfour/laravel-flash-messages
Usage
use Balfour\LaravelFlashMessages\FlashMessages; // resolve the message container $flash = app(FlashMessages::class); // or $flash = app('flash'); // flash a message $flash->flash('error', 'You are not authorized.'); // flash a message with a title $flash->flash('error', 'You are not authorized.', 'Oopsie'); // add a message to the current container // this message won't flash to the next request $flash->add('error', 'You are not authorized.'); // retrieve all flash message $messages = $flash->all(); // wipe all messages $messages->clear();