Description
This is a lightweight package to send flash messages in Laravel apps. A flash message is a message that is carried over to the next request by storing it in the session. This package only supports one single flash message at a time.
This is how it can be used:
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
Recent Courses on Laravel Daily
Laravel 13 Starter Kit Teams and Customizations
10 lessons
33 min
How to Build Laravel 13 API From Scratch
30 lessons
1 h 23 min
How to Structure Laravel 13 Projects
16 lessons
1 h 32 min read