PHPackages                             tonning/flash - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tonning/flash

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tonning/flash
=============

Flash for Laravel

1.0.0(1y ago)116.4k↓33.9%MITPHPPHP ^8.0

Since Oct 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/tonning/flash)[ Packagist](https://packagist.org/packages/tonning/flash)[ Docs](https://github.com/tonning/flash)[ GitHub Sponsors](https://github.com/tonning)[ RSS](/packages/tonning-flash/feed)WikiDiscussions main Synced yesterday

READMEChangelog (2)Dependencies (2)Versions (8)Used By (0)

Flash for Laravel
=================

[](#flash-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/49c93fa470cb60f02ba999e40f22090b1f996ca2ecff4290795bcdb104aa1b88/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f6e6e696e672f666c6173682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tonning/flash)[![GitHub Tests Action Status](https://camo.githubusercontent.com/4b4b8d367280ced2320c7644bf88017006ea8bb6dbb520de141ca3e9fb6e9277/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f746f6e6e696e672f666c6173682f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/tonning/flash/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/ed23a4887571a7a0ffac46fd73d31f297c083b0fb3d403c5da72d363d457f2bb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f746f6e6e696e672f666c6173682f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/tonning/flash/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/c6222404b0a736d713686ed9bceb340d537f093dff94599b872609b1d96fbe2e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f6e6e696e672f666c6173682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tonning/flash)

This composer package offers a Tailwind optimized flash messaging setup for your Laravel applications.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require tonning/flash
```

You can publish the view files with:

```
php artisan vendor:publish --provider="Tonning\Flash\FlashServiceProvider" --tag="flash-views"
```

You can publish the config file with:

```
php artisan vendor:publish --provider="Tonning\Flash\FlashServiceProvider" --tag="flash-config"
```

This is the contents of the published config file:

```
return [
    'display_errors' => true,
];
```

Usage
-----

[](#usage)

Anywhere in your application you can added a flash notification.

```
use Tonning\Flash\Flash;

Flash::info('A new software update is available. See what’s new in version 2.0.4.');
```

[![flash_info](https://user-images.githubusercontent.com/7304678/137721035-07139c6b-d096-457d-8f4e-b0c1b5c8b2df.png)](https://user-images.githubusercontent.com/7304678/137721035-07139c6b-d096-457d-8f4e-b0c1b5c8b2df.png)

### Displaying notifications

[](#displaying-notifications)

```
@if(flash()->hasAny())
    {!! flash() !!}
@endif
```

### Titles

[](#titles)

You can also provide a title to your notifications that will be displayed along with it.

```
use Tonning\Flash\Flash;

Flash::warning('Please confirm your email address.', 'Attention needed');
```

[![flash_warning_single](https://user-images.githubusercontent.com/7304678/137721066-4bde8269-504c-4731-af9d-ed42028bf6f6.png)](https://user-images.githubusercontent.com/7304678/137721066-4bde8269-504c-4731-af9d-ed42028bf6f6.png)

### Grouping

[](#grouping)

Notifications of the same type will be grouped in an unordered list.

```
use Tonning\Flash\Flash;

Flash::warning('Facilisis himenaeos nullam habitasse lacus sem auctor.');
Flash::warning('Please confirm your email address.', 'Attention needed');
Flash::warning('Facilisis egestas fermentum porttitor sapien eleifend amet.');
```

[![flash_warning_multiple_grouped](https://user-images.githubusercontent.com/7304678/137721115-3f25b870-54be-40a8-a959-1b19c67eabe1.png)](https://user-images.githubusercontent.com/7304678/137721115-3f25b870-54be-40a8-a959-1b19c67eabe1.png)

### Errors

[](#errors)

This package will by default also display any validation errors.

```
throw ValidationException::withMessages(['Something went wrong.']);
```

[![flash_error](https://user-images.githubusercontent.com/7304678/137721137-cab37f89-7c02-4a5a-8f62-ebdc5a1c93e9.png)](https://user-images.githubusercontent.com/7304678/137721137-cab37f89-7c02-4a5a-8f62-ebdc5a1c93e9.png)

This can be turned of in the config file.

```
'display_errors' => false,
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Kristoffer Tonning](https://github.com/tonning)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~194 days

Recently: every ~278 days

Total

7

Last Release

551d ago

Major Versions

0.1.5 → 1.0.02024-12-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/4e9527ee45d5bf016d30f77ce27f61e964a126cf168255fe68625af4ae83bf26?d=identicon)[tonning](/maintainers/tonning)

---

Top Contributors

[![tonning](https://avatars.githubusercontent.com/u/7304678?v=4)](https://github.com/tonning "tonning (20 commits)")

---

Tags

laravelflashtonning

###  Code Quality

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tonning-flash/health.svg)

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

###  Alternatives

[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[stephenjude/filament-feature-flags

Filament implementation of feature flags and segmentation with Laravel Pennant.

122177.8k1](/packages/stephenjude-filament-feature-flags)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[marcelweidum/filament-expiration-notice

Customize the livewire expiration notice

94135.4k5](/packages/marcelweidum-filament-expiration-notice)[awcodes/richer-editor

A collection of extensions and tools to enhance the Filament Rich Editor field.

3912.8k9](/packages/awcodes-richer-editor)

PHPackages © 2026

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