combindma / flash
Easy Flash Messages for a Laravel App
2.2.0
2024-03-16 00:46 UTC
Requires
- php: ^8.2
- illuminate/session: ^10.0|^11.0
- spatie/laravel-package-tools: ^1.4.3
Requires (Dev)
- brianium/paratest: ^6.2|^7.0
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.0|^8.0
- orchestra/testbench: ^8.0|^9.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
README
Installation
You can install the package via composer:
composer require combindma/flash
Usage
class MySpecialSnowflakeController { public function store() { // … flash('My message', 'my-class'); return back(); } }
In your view you can do this:
@if (flash()->message) <div class="{{ flash()->class }}"> {{ flash()->message }} </div> @endif
Testing
composer test
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.