PHPackages                             gnahotelsolutions/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. [Mail &amp; Notifications](/categories/mail)
4. /
5. gnahotelsolutions/flasher

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

gnahotelsolutions/flasher
=========================

Flash notifications in Laravel

4.2.0(2mo ago)35.9k↑128.6%1MITPHPPHP ^8.2CI failing

Since Jun 6Pushed 2mo ago5 watchersCompare

[ Source](https://github.com/gnahotelsolutions/flasher)[ Packagist](https://packagist.org/packages/gnahotelsolutions/flasher)[ RSS](/packages/gnahotelsolutions-flasher/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (6)Versions (15)Used By (0)

Flasher
=======

[](#flasher)

[![Latest Version on Packagist](https://camo.githubusercontent.com/939078ddce8cd41826478e9a5c10640a5c0b939e26997b11f4942d12319a90bc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f676e61686f74656c736f6c7574696f6e732f666c61736865722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gnahotelsolutions/flasher)[![Total Downloads](https://camo.githubusercontent.com/9c10f3a91b6b0f9898fb0da9257b6f4843b8f27a31fa040204c1c5ad321c0347/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f676e61686f74656c736f6c7574696f6e732f666c61736865722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gnahotelsolutions/flasher)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)

The `gnahotelsolutions/flasher` package provides an easy way to interact with flashed messages in your Laravel application.

Install
-------

[](#install)

You can install the package via composer:

```
$ composer require gnahotelsolutions/flasher
```

Usage
-----

[](#usage)

The messages are stored in the `notifications` session key.

All notifications have a default `duration` property set to 5 seconds. You can use this property in your JavaScript to make notifications disappear automatically.

### Creating notifications

[](#creating-notifications)

```
Flasher::info("Welcome, {$user->name}");

Flasher::error('Incorrect password');

Flasher::warning('Remember to change your password');

Flasher::success('Password changed!');
```

If you want to use custom types, you can use the method `createNotification`

```
Flasher::createNotification('store', 'Someone bought a product!', null);
```

### Check if there are pending notifications

[](#check-if-there-are-pending-notifications)

```
@if (Flasher::any())

        ...

@endif
```

### Iterating over notifications

[](#iterating-over-notifications)

```
@foreach(Flasher::all() as $notification)

        {{ $notification->getMessage() }}

@endforeach
```

If you're using [Bootstrap](https://getbootstrap.com) in your project, you can use `getBootstrapClass()` method. It will replace `error` with `danger` to match the framework's CSS class.

Testing
-------

[](#testing)

```
phpunit
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT).

###  Health Score

55

—

FairBetter than 97% of packages

Maintenance85

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 74.1% 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 ~192 days

Recently: every ~339 days

Total

14

Last Release

78d ago

Major Versions

v1.1.0 → v2.0.02019-06-20

2.6.0 → 3.0.02022-07-18

3.1.0 → 4.0.02025-01-14

PHP version history (4 changes)v1.0PHP ^7.1

2.5.0PHP ^7.1|^8.0

3.0.0PHP ^7.1|^8.0|^8.1

4.0.0PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5665466?v=4)[David Llop](/maintainers/lloople)[@Lloople](https://github.com/Lloople)

---

Top Contributors

[![Lloople](https://avatars.githubusercontent.com/u/5665466?v=4)](https://github.com/Lloople "Lloople (20 commits)")[![adriacanal](https://avatars.githubusercontent.com/u/5726514?v=4)](https://github.com/adriacanal "adriacanal (4 commits)")[![edgarst](https://avatars.githubusercontent.com/u/71487721?v=4)](https://github.com/edgarst "edgarst (1 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")[![torralbodavid](https://avatars.githubusercontent.com/u/17132682?v=4)](https://github.com/torralbodavid "torralbodavid (1 commits)")

---

Tags

flashed-messagesflasherhacktoberfestlaravellaravel-packagenotificationsphp

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[propaganistas/laravel-disposable-email

Disposable email validator

6012.9M7](/packages/propaganistas-laravel-disposable-email)[illuminate/mail

The Illuminate Mail package.

5910.4M471](/packages/illuminate-mail)[laravel-notification-channels/apn

Apple APN Push Notification Channel

2022.1M6](/packages/laravel-notification-channels-apn)[illuminate/notifications

The Illuminate Notifications package.

483.0M1.1k](/packages/illuminate-notifications)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

252143.0k](/packages/erag-laravel-disposable-email)

PHPackages © 2026

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