You can install the package via composer:
composer require combindma/flash
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
composer test
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.