Add elegant notifications to your Laravel or Symfony applications with just one line of code. Perfect for developers of all skill levels.
Design your perfect notification and see the code instantly
Get up and running in less than a minute
composer require php-flasher/flasher-laravel
composer require php-flasher/flasher-symfony
Everything you need to add beautiful notifications to your PHP applications
PHPFlasher integrates with popular JavaScript notification libraries
Simple toast notifications for web applications. Clean, elegant and customizable.
Beautiful, responsive, customizable alert dialogs with interactive elements.
Highly customizable notification library with multiple positions and animations.
Minimalist toast notifications with a clean design and smooth animations.
Just a few lines of code to get started
namespace App\Http\Controllers;
class ProfileController extends Controller
{
public function update(Request $request)
{
// Update user profile logic
// Show success notification
flash()->success('Profile updated successfully!');
// Or add a title
flash()->success('Your changes have been saved.', 'Profile Updated');
// Change notification options
flash()->options([
'timeout' => 5000,
'position' => 'top-right'
])->success('Changes saved with custom settings');
return back();
}
}
// Form submission example
document.getElementById('contact-form').addEventListener('submit', async function(e) {
e.preventDefault();
try {
const response = await submitForm(this);
if (response.success) {
// Show success notification
flasher.success('Your message has been sent!', 'Thank You');
} else {
// Show error notification
flasher.error('Please check your form inputs', 'Error');
}
} catch (error) {
// Show error notification with details
flasher.error('Server error, please try again later.', 'Error');
console.error(error);
}
});
See what others are saying about PHPFlasher
"Honestly wasn't expecting much, but wow! Saved me hours of headaches with our notification system. Just dropped it in and it worked first try. No more fighting with JS libraries!"
"We were using Toastr directly but it was a mess maintaining it. Switched to PHPFlasher last sprint and it just works. The Livewire integration is a huge time saver too. Only nitpick is I wish the docs had more examples."
"Been using PHPFlasher in our Symfony app for 6+ months. Had an issue with modal stacking, reached out on GitHub and got a fix in like 2 days! That kind of support is rare for open source. Huge thanks to @younes!"
Help us make PHPFlasher even better
Add beautiful notifications to your Laravel or Symfony applications in minutes with PHPFlasher.