PHPackages                             php-flasher/php-flasher - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. php-flasher/php-flasher

ActiveLibrary

php-flasher/php-flasher
=======================

The core repository for PHPFlasher, hosting the source code, contributions, issue tracking, and discussions for the PHPFlasher project. This mono-repo serves as the hub for development and community engagement.

v2.5.0(2mo ago)3654.1k↑50%20[6 issues](https://github.com/php-flasher/php-flasher/issues)MITPHPPHP &gt;=8.2CI failing

Since Dec 14Pushed 2mo ago3 watchersCompare

[ Source](https://github.com/php-flasher/php-flasher)[ Packagist](https://packagist.org/packages/php-flasher/php-flasher)[ Docs](https://php-flasher.io)[ GitHub Sponsors](https://github.com/yoeunes)[ RSS](/packages/php-flasher-php-flasher/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (10)Dependencies (29)Versions (131)Used By (0)

 [ ![Help Palestine](https://raw.githubusercontent.com/php-flasher/art/main/palestine-banner-support.svg) ](https://github.com/php-flasher/php-flasher/blob/2.x/docs/palestine.md)

   ![PHPFlasher Logo](https://raw.githubusercontent.com/php-flasher/art/main/php-flasher-logo.png)

Elegant Flash Notifications for PHP
===================================

[](#elegant-flash-notifications-for-php)

 **One line of PHP. Beautiful notifications. Zero JavaScript.**

 [![Downloads](https://camo.githubusercontent.com/0ed25bd33ea5d25d75ce217d502bf799a9b86868cfeae79e1d9b52fa3170d573/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068702d666c61736865722f666c61736865722e7376673f7374796c653d666c61742d737175617265266c6162656c3d646f776e6c6f616473)](https://packagist.org/packages/php-flasher/flasher) [![Stars](https://camo.githubusercontent.com/d584c192d3a8e44fcfe34cc6f6b00cb710c9bd49a4459ed266f6aa2e4bde43e9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f7068702d666c61736865722f7068702d666c61736865722e7376673f7374796c653d666c61742d737175617265266c6162656c3d7374617273)](https://github.com/php-flasher/php-flasher) [![Release](https://camo.githubusercontent.com/210a5f675e7ef38026bb39261edf8a822587e76321db041b37361fa5df057ee4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f7068702d666c61736865722f666c61736865722e7376673f7374796c653d666c61742d737175617265)](https://github.com/php-flasher/php-flasher/releases) [![PHP Version](https://camo.githubusercontent.com/4bdb101967f5f420c8cff0b045e8c9a3de615d0c549e8a1592147323b519b40c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7068702d666c61736865722f666c61736865722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/php-flasher/flasher) [![License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/php-flasher/flasher/blob/master/LICENSE)

 [**Documentation**](https://php-flasher.io) · [**Live Playground**](https://php-flasher.io/playground) · [**Report Bug**](https://github.com/php-flasher/php-flasher/issues)

---

Quick Start
-----------

[](#quick-start)

**Laravel:**

```
composer require php-flasher/flasher-laravel && php artisan flasher:install
```

**Symfony:**

```
composer require php-flasher/flasher-symfony && php bin/console flasher:install
```

**That's it!** Now use it:

```
flash()->success('Welcome aboard! Your account is ready.');
```

---

Why PHPFlasher?
---------------

[](#why-phpflasher)

PHPFlasherOthers**Zero JavaScript**Write PHP only, frontend handled automaticallyRequires manual JS setup**Auto Asset Injection**CSS/JS injected automaticallyManual script tags needed**17 Built-in Themes**Amazon, iOS, Slack, Material &amp; moreLimited or no themes**4 Notification Libraries**Toastr, SweetAlert, Noty, NotyfSingle library only**Livewire Integration**Full event system supportLimited or none**RTL Support**Built-in right-to-leftOften missing**Framework Agnostic**Laravel, Symfony, or vanilla PHPFramework-specific---

Notification Types
------------------

[](#notification-types)

```
flash()->success('Operation completed successfully!');
flash()->error('Oops! Something went wrong.');
flash()->warning('Please backup your data before continuing.');
flash()->info('A new version is available for download.');
```

### With Titles

[](#with-titles)

```
flash()->success('Your changes have been saved.', 'Update Complete');
flash()->error('Unable to connect to server.', 'Connection Failed');
```

### With Options

[](#with-options)

```
flash()->success('Profile updated!', [
    'position' => 'bottom-right',
    'timeout' => 10000,
]);
```

---

17 Beautiful Themes
-------------------

[](#17-beautiful-themes)

PHPFlasher includes **17 professionally designed themes** ready to use:

```
flash()->success('Welcome!', ['theme' => 'amazon']);
flash()->success('Welcome!', ['theme' => 'ios']);
flash()->success('Welcome!', ['theme' => 'slack']);
flash()->success('Welcome!', ['theme' => 'material']);
```

**View All Themes**ThemeStyle`flasher`Default clean design`amazon`Amazon-inspired e-commerce`ios`Apple iOS notifications`slack`Slack messaging style`material`Google Material Design`google`Google notifications`facebook`Facebook style`minimal`Ultra-clean minimal`amber`Warm amber tones`aurora`Gradient effects`crystal`Transparent design`emerald`Modern green palette`jade`Soft jade colors`neon`Bright attention-grabbing`onyx`Dark mode sleek`ruby`Bold ruby accents`sapphire`Elegant blue style[**See all themes with live demos →**](https://php-flasher.io/themes)

---

Notification Libraries
----------------------

[](#notification-libraries)

Need more features? Use popular notification libraries:

### Toastr

[](#toastr)

```
composer require php-flasher/flasher-toastr-laravel
```

```
toastr()->success('Profile saved!', [
    'positionClass' => 'toast-bottom-right',
    'progressBar' => true,
]);
```

### SweetAlert

[](#sweetalert)

```
composer require php-flasher/flasher-sweetalert-laravel
```

```
sweetalert()
    ->showDenyButton()
    ->showCancelButton()
    ->warning('Do you want to save changes?');
```

### Noty

[](#noty)

```
composer require php-flasher/flasher-noty-laravel
```

```
noty()->success('Data synchronized!', [
    'layout' => 'topCenter',
    'timeout' => 3000,
]);
```

### Notyf

[](#notyf)

```
composer require php-flasher/flasher-notyf-laravel
```

```
notyf()->success('Upload complete!', [
    'dismissible' => true,
    'ripple' => true,
]);
```

---

Livewire Integration
--------------------

[](#livewire-integration)

PHPFlasher integrates seamlessly with Laravel Livewire:

```
use Livewire\Attributes\On;

class UserProfile extends Component
{
    public function save()
    {
        // Save logic...

        sweetalert()
            ->showDenyButton()
            ->success('Save changes?');
    }

    #[On('sweetalert:confirmed')]
    public function onConfirmed(array $payload): void
    {
        // User clicked confirm
        $this->user->save();
        flash()->success('Profile saved!');
    }

    #[On('sweetalert:denied')]
    public function onDenied(array $payload): void
    {
        // User clicked deny
    }
}
```

[**Livewire documentation →**](https://php-flasher.io/livewire)

---

Configuration
-------------

[](#configuration)

### Laravel

[](#laravel)

```
// config/flasher.php
return [
    'default' => 'flasher',
    'themes' => [
        'flasher' => [
            'options' => [
                'timeout' => 5000,
                'position' => 'top-right',
            ],
        ],
    ],
];
```

### Symfony

[](#symfony)

```
# config/packages/flasher.yaml
flasher:
    default: flasher
    themes:
        flasher:
            options:
                timeout: 5000
                position: top-right
```

### Common Options

[](#common-options)

OptionTypeDefaultDescription`timeout`int`5000`Auto-dismiss delay in ms (0 = sticky)`position`string`top-right``top-right`, `top-left`, `bottom-right`, `bottom-left`, `top-center`, `bottom-center``closeButton`bool`true`Show close button`progressBar`bool`true`Show timeout progress bar`rtl`bool`false`Right-to-left text direction`escapeHtml`bool`true`Escape HTML in messages---

Requirements
------------

[](#requirements)

RequirementVersionPHP&gt;= 8.2Laravel&gt;= 11.0Symfony&gt;= 7.0---

Documentation
-------------

[](#documentation)

For complete documentation, visit **[php-flasher.io](https://php-flasher.io)**

- [Installation Guide](https://php-flasher.io/installation)
- [Laravel Integration](https://php-flasher.io/laravel)
- [Symfony Integration](https://php-flasher.io/symfony)
- [Livewire Integration](https://php-flasher.io/livewire)
- [Inertia.js Integration](https://php-flasher.io/inertia)
- [Themes Gallery](https://php-flasher.io/themes)
- [JavaScript Usage](https://php-flasher.io/javascript)

---

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a [Pull Request](https://github.com/php-flasher/php-flasher/pulls).

Contributors
------------

[](#contributors)

[ ![Contributors](https://camo.githubusercontent.com/288b17e74553f95dd29289353030d0a1d4faa230247e99377f502df5857006c3/68747470733a2f2f636f6e747269622e726f636b732f696d6167653f7265706f3d7068702d666c61736865722f7068702d666c6173686572)](https://github.com/php-flasher/php-flasher/graphs/contributors)---

Support the Project
-------------------

[](#support-the-project)

If PHPFlasher helps you build better applications, please consider:

- **[Star this repository](https://github.com/php-flasher/php-flasher)** to show your support
- **[Report bugs](https://github.com/php-flasher/php-flasher/issues)** to help improve the library
- **[Share on Twitter](https://twitter.com/intent/tweet?text=Check%20out%20PHPFlasher%20-%20beautiful%20flash%20notifications%20for%20PHP!&url=https://github.com/php-flasher/php-flasher)** to spread the word

---

License
-------

[](#license)

PHPFlasher is open-source software licensed under the [MIT license](LICENSE).

 **Made with ❤️ by [Younes ENNAJI](https://github.com/yoeunes)**

 [⭐ Star if you find this useful!](https://github.com/php-flasher/php-flasher/stargazers)

###  Health Score

63

—

FairBetter than 99% of packages

Maintenance93

Actively maintained with recent releases

Popularity41

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 97.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~15 days

Recently: every ~94 days

Total

131

Last Release

62d ago

Major Versions

v0.9.8 → v1.0.82022-05-16

v1.15.14 → v2.0.02024-05-05

1.x-dev → v2.1.22025-01-18

PHP version history (2 changes)v0.1.0PHP &gt;=5.3

v2.0.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/719ac0f6bf24d689686134530caf539727d784ad4a66c81ad5dcdba161b4ea0a?d=identicon)[yoeunes](/maintainers/yoeunes)

---

Top Contributors

[![yoeunes](https://avatars.githubusercontent.com/u/10859693?v=4)](https://github.com/yoeunes "yoeunes (610 commits)")[![yoeunes-spin](https://avatars.githubusercontent.com/u/86292260?v=4)](https://github.com/yoeunes-spin "yoeunes-spin (6 commits)")[![AhmedGamal](https://avatars.githubusercontent.com/u/11786167?v=4)](https://github.com/AhmedGamal "AhmedGamal (3 commits)")[![ImJustToNy](https://avatars.githubusercontent.com/u/5730766?v=4)](https://github.com/ImJustToNy "ImJustToNy (2 commits)")[![BrookeDot](https://avatars.githubusercontent.com/u/150348?v=4)](https://github.com/BrookeDot "BrookeDot (2 commits)")[![robiinho](https://avatars.githubusercontent.com/u/8749820?v=4)](https://github.com/robiinho "robiinho (1 commits)")[![ToshY](https://avatars.githubusercontent.com/u/31921460?v=4)](https://github.com/ToshY "ToshY (1 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")

---

Tags

flash-messageslaravelnotification-systemnotynotyfphppnotifysweetalertsymfonytoastryoeunesphpnotificationsflash-messagesopen-sourceuser-feedbackphpflasherdiscussionsissue-trackingcontributions

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Type Coverage Yes

### Embed Badge

![Health badge](/badges/php-flasher-php-flasher/health.svg)

```
[![Health](https://phpackages.com/badges/php-flasher-php-flasher/health.svg)](https://phpackages.com/packages/php-flasher-php-flasher)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M647](/packages/sylius-sylius)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k16.7M308](/packages/easycorp-easyadmin-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M151](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[contao/core-bundle

Contao Open Source CMS

1231.6M2.3k](/packages/contao-core-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
