PHPackages                             hexbit/php-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. [Queues &amp; Workers](/categories/queues)
4. /
5. hexbit/php-flash

ActiveLibrary[Queues &amp; Workers](/categories/queues)

hexbit/php-flash
================

Its a session based redirector with flash messages for php.

1.0.1(5y ago)071MITPHPPHP &gt;=5.6.0CI failing

Since Jun 4Pushed 5y ago1 watchersCompare

[ Source](https://github.com/smarteist/PHP-Flash)[ Packagist](https://packagist.org/packages/hexbit/php-flash)[ Docs](https://github.com/smarteist/wordpress-router)[ RSS](/packages/hexbit-php-flash/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

PHP FLASH
=========

[](#php-flash)

Its a session based redirector with flash messages for php. you can set flash messages between redirects and you can get your messages only once with php `$_SESSION` super global array.

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

[](#installation)

Use the package manager [composer](https://getcomposer.org/) to install php flash.

```
composer require hexbit/php-flash
```

Usage
-----

[](#usage)

```
use Hexbit\Flash\Flash;

// first initialize it:
Flash::init();

// build a new instance of flash
$flash = new Flash();

// simple usage and redirect back!
$flash->redirectBy('contact')
        ->message('failed', 'It seems your email is not valid!')
        ->redirectBack();

// redirect to specific location
$flash->redirectBy('contact')
        ->redirectLocation("https://somewhere/")
        ->withStatus(302)
        ->message('failed', 'It seems your email is not valid!')
        ->redirect();

// redirect to specific location and then redirect again after 5 seconds!
$flash->redirectLocation("https://somwhere/")
        ->message('failed', 'It seems your email is not valid!')
        ->secondRedirect(5, "https://somewhereelse/")
        ->redirect();
```

Now your flash messages will be available just once (after redirection) in the superGlobal `$_SESSION` array.

And obviously, there will be no messages for the next times and will be cleared.

```
if (isset($_SESSION['failed']) {
        // show your error message for example
}
```

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

[](#contributing)

Pull requests are always welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make %sure% to update tests as appropriate.

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

Every ~0 days

Total

2

Last Release

2174d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/11ea0610008f6712c8c0466e4057fbb3a6a362530fd48786eb175701229587b9?d=identicon)[smarteist](/maintainers/smarteist)

---

Top Contributors

[![smarteist](https://avatars.githubusercontent.com/u/30802876?v=4)](https://github.com/smarteist "smarteist (7 commits)")

---

Tags

messagewordpresssessionflashredirecthexbitsmarteist

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[hexbit/sage-woocommerce

Woocommerce support for sage 10

257.0k](/packages/hexbit-sage-woocommerce)

PHPackages © 2026

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