https://github.com/voorhof/flash
Flashing Bootstrap alerts
https://github.com/voorhof/flash
alerts bootstrap flash-messages laravel laravel-package
Last synced: 5 months ago
JSON representation
Flashing Bootstrap alerts
- Host: GitHub
- URL: https://github.com/voorhof/flash
- Owner: voorhof
- License: mit
- Created: 2025-07-18T18:21:32.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2026-01-12T05:50:10.000Z (6 months ago)
- Last Synced: 2026-01-12T15:44:07.108Z (6 months ago)
- Topics: alerts, bootstrap, flash-messages, laravel, laravel-package
- Language: PHP
- Homepage:
- Size: 38.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Flash Message
[](https://packagist.org/packages/voorhof/flash)
[](https://github.com/voorhof/flash/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amaster)
[](https://packagist.org/packages/voorhof/flash)
A simple, elegant flash messaging package for Laravel applications,
using [Bootstrap alerts](https://getbootstrap.com/docs/5.3/components/alerts/) as the view.
## Installation
You can install the package via composer:
```bash
composer require voorhof/flash
```
The package will automatically register its service provider.
You can publish the configuration file with:
```bash
php artisan vendor:publish --provider="Voorhof\Flash\FlashServiceProvider" --tag="flash-config"
```
You can publish the views with:
```bash
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
- [David Carton](https://github.com/voorhof)
- [All Contributors](https://github.com/voorhof/cms/contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.