A powerful and flexible flash notification system for PHP
With Symfony and Laravel implementations

Docs GitHub Twitter

Author Source GitHub release License Packagist PHP Version flasher.min.js

Why use PHPFlasher ?

This library is designed, so you can take full control when creating your notifications :
  • Render multiple notifications simultaneously
  • Render notification easily from javascript
  • LTR and Dark-mode support
  • Limit the amount of displayed notifications
  • Show Desktop notifications for : Linux, MacOS and Windows
  • Framework-agnostic with implementations for: Laravel and Symfony
  • Autocomplete for PHPSTORM
  • You can always create an adapter yourself
  • ...and more
PHPFlasher usage

Easy To use to fit your taste

This library was developed with the idea that you should be able to add flash notifications to your application easily with few lines of code.

Inject the Flasher service and show a default notification library, or choose a specific one by calling the create(string $library) method.

Build your notification and add options to it using the default notification builder, several notification builders exists to provide the assistance needed when creating your notifications.

you can also add custom data to your notification with stamps:
The library is accompanied by some stamps out of the box :

Render you notifications

PHPFlasher make it very easy to render your notifications just by adding a simple line of code.

You don't have to worry about importing your javascript or stylesheets, PHPFlasher handle this for you, and it only loads the needed files when notifications are ready to be rendered.

You can customize how you want to display your notifications: Limit the number of displayed notifications, order them and also filter them how you want with stamps, of course you can add your own logic here.

Render Notifications

PHPFlasher is a project by Younes KHOUBZA.