voorhof / flash
A simple flash message service for Laravel applications, using Bootstrap alerts
v1.0.2
2025-07-28 07:17 UTC
Requires
- php: ^8.2
- illuminate/support: ^12.0
Requires (Dev)
- laravel/framework: ^12.0
- orchestra/testbench: ^10.0
- phpstan/phpstan: ^2.0
This package is auto-updated.
Last update: 2025-07-28 15:41:54 UTC
README
A simple, elegant flash messaging package for Laravel applications, using Bootstrap alerts as the view.
Installation
You can install the package via composer:
composer require voorhof/flash
The package will automatically register its service provider.
You can publish the configuration file with:
php artisan vendor:publish --provider="Voorhof\Flash\FlashServiceProvider" --tag="flash-config"
You can publish the views with:
php artisan vendor:publish --provider="Voorhof\Flash\FlashServiceProvider" --tag="flash-views"
Usage
use Voorhof\Flash\Facades\Flash;
// Flash a success message
Flash::success('Item created successfully!');
// Flash a warning message
Flash::warning('Please review your input.');
// Flash a danger/error message
Flash::danger('An error occurred!');
// Flash an info message
Flash::info('Here is some information.');
In your Blade template, include the flash message component:
@include('flash::flash')
Credits
License
The MIT License (MIT). Please see License File for more information.