Notyf adapter for PHP flasher

Last updated at 08 May 2022 | Published at 28 November 2020

If you like PHPFlasher please consider giving it a on github or by spreading the word on twitter. Your support allows me to keep this package up-to-date and maintainable. Thank you


For more information about notyf click here.

For Vanilla PHP:

composer require php-flasher/flasher-notyf

For Laravel:

composer require php-flasher/flasher-notyf-laravel

For Symfony:

composer require php-flasher/flasher-notyf-symfony


Just instantiate the NotyfFactory and start calling build methods

namespace App\Controller;

use Flasher\Notyf\Prime\NotyfFactory;

class NotifyController
    public function flasher(NotyfFactory $flasher)
        // ... 
        $flasher->addSuccess('Data has been saved successfully!');
        // ... redirect or render a view here

Fluent Builder methods

All methods in the Usage section are available also for NotyfFactory


Number of miliseconds before hiding the notification. Use 0 for infinite duration.

$flasher->duration(int $duration)


Whether to show the notification with a ripple effect

$flasher->ripple(bool $ripple)


Viewport location where notifications are rendered

$flasher->position(string $position, string $value)


Whether to allow users to dismiss the notification with a button

$flasher->dismissible(bool $dismissible)

PHPFlasher is a project by Younes KHOUBZA.