PHPackages                             sh/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. sh/flash

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

sh/flash
========

Plugin to display flash messages.

v1.0(11y ago)013MITPHPPHP &gt;=5.4

Since Apr 9Pushed 11y ago1 watchersCompare

[ Source](https://github.com/semirhuduti/FlashMessage)[ Packagist](https://packagist.org/packages/sh/flash)[ Docs](https://github.com/semirhuduti)[ RSS](/packages/sh-flash/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

[![Build Status](https://camo.githubusercontent.com/c7931908085d265d4043a86baed9939b4c56490726df0e3a6c6915fbc56245eb/68747470733a2f2f7472617669732d63692e6f72672f73656d69726875647574692f466c6173684d6573736167652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/semirhuduti/FlashMessage) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/9e79a0d6cf1f4626018da806442d4eec9cb5ce256a42069616810e651bfd6e3f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73656d69726875647574692f466c6173684d6573736167652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/semirhuduti/FlashMessage/?branch=master) [![Code Coverage](https://camo.githubusercontent.com/beb85215295a1d62c1d405ec518bec7871c78e8bc328a36fcf78ac38dbdf23d9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73656d69726875647574692f466c6173684d6573736167652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/semirhuduti/FlashMessage/?branch=master)

FlashMessage
============

[](#flashmessage)

This module is used to display flash messages in your project.

To use this module the following code needs be added in the frotcontroller.

```
$di->setShared('flash', function() {
    $flash = new \Anax\FlashMessage\FlashMessage();
    return $flash;
});
```

If you want to keep the code consistent it also can be added in the CDIFactoryDefault that is located in src/DI. It should be added like this.

```
$this->setShared('flash', function() {
    $flash = new \Anax\FlashMessage\FlashMessage();
    return $flash;
});
```

To use the the flash messages add the following line to your project.

```
  $app->flash->message('information', 'This is a info message');
  $app->flash->message('warning', 'This is a warning message');
  $app->flash->message('success', 'This is a success message');
  $app->flash->message('error', 'This is a error message');
```

This will generate HTML-code that will be displayed in the view.

The style of the flash messages can be changed in the flash.css file.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

4104d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/170d06f59a224bb383a5f7e3ae61209bcb1c2a8d82ce73e492dd59382bb276b3?d=identicon)[semirhuduti](/maintainers/semirhuduti)

---

Top Contributors

[![semirhuduti](https://avatars.githubusercontent.com/u/6482746?v=4)](https://github.com/semirhuduti "semirhuduti (13 commits)")

---

Tags

flashmessageseducation

### Embed Badge

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

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

###  Alternatives

[prologue/alerts

Prologue Alerts is a package that handles global site messages.

3486.5M38](/packages/prologue-alerts)[plasticbrain/php-flash-messages

A modern take on PHP session-based flash messages

184229.8k8](/packages/plasticbrain-php-flash-messages)[coderello/laraflash

Advanced flash messages for Laravel.

15737.2k1](/packages/coderello-laraflash)[cartalyst/alerts

Alerts allows you to easily pass alert messages to your Laravel views.

2671.7k](/packages/cartalyst-alerts)[dereuromark/cakephp-flash

A CakePHP plugin around powerful flash message handling.

1230.6k2](/packages/dereuromark-cakephp-flash)[tatter/alerts

Lightweight user alerts for CodeIgniter 4

4080.9k6](/packages/tatter-alerts)

PHPackages © 2026

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