php-flasher/flasher-laravel
Laravel integration for PHP Flasher: add stylish flash notifications (success, error, info) to your app with an easy API, session support, and multiple adapters/themes. Quick to install, configurable, and works seamlessly with Laravel’s middleware and views.
Laravel framework adapter for PHPFlasher. Seamless integration with zero JavaScript setup.
composer require php-flasher/flasher-laravel
Run the install command:
php artisan flasher:install
// Success notification
flash()->success('Operation completed successfully!');
// Error notification
flash()->error('An error occurred.');
// With options
flash()->success('Profile updated!', [
'timeout' => 5000,
'position' => 'top-right',
]);
// In controller
public function update(Request $request)
{
// Your logic...
flash()->success('Changes saved!');
return redirect()->back();
}
Publish configuration file:
php artisan flasher:install --config
This creates config/flasher.php where you can customize:
Complete documentation: php-flasher.io
How can I help you explore Laravel packages today?