PHPackages                             ajur-media/template.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. ajur-media/template.flash

AbandonedArchivedLibrary

ajur-media/template.flash
=========================

Flash messages based on Slim Framework code

0.99.0(1y ago)0133[1 issues](https://github.com/ajur-media/template.flash/issues)MITPHPPHP ^7.4 || 8.\*

Since Feb 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ajur-media/template.flash)[ Packagist](https://packagist.org/packages/ajur-media/template.flash)[ RSS](/packages/ajur-media-templateflash/feed)WikiDiscussions master Synced 1mo ago

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

Slim Framework Flash Messages
=============================

[](#slim-framework-flash-messages)

Flash messages enables you to define transient messages that persist only from the current request to the next request.

Install
-------

[](#install)

Via Composer

```
$ composer require ajur-media/template.flash
```

Usage
-----

[](#usage)

### Slim 3

[](#slim-3)

```
// Start PHP session
if (!session_id()) @session_start();

App::$flash = new \AJUR\Template\FlashMessages();

// or use DI Container

$app->get('/foo', function ($req, $res, $args) {
    // Set flash message for next request
    App::$flash->addMessage('Test', 'This is a message');

    // Redirect
    return $res->withStatus(302)->withHeader('Location', '/bar');
});

$app->get('/bar', function ($req, $res, $args) {
    // Get flash messages from previous request
    $messages = $this->flash->getMessages();
    print_r($messages);

    // Get the first message from a specific key
    $test = $this->flash->getFirstMessage('Test');
    print_r($test);
});

$app->run();
```

> Please note that a message could be a string, object or array. Please check what your storage can handle.

Testing
-------

[](#testing)

```
$ phpunit
```

License
-------

[](#license)

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

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 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 ~205 days

Total

2

Last Release

619d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d4a5bbb45fc701f595e17c74b94658126704ebc4eafb3fb1aa8bc613cdcbbbd?d=identicon)[KarelWintersky](/maintainers/KarelWintersky)

---

Top Contributors

[![KarelWintersky](https://avatars.githubusercontent.com/u/2164874?v=4)](https://github.com/KarelWintersky "KarelWintersky (3 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisRector

### Embed Badge

![Health badge](/badges/ajur-media-templateflash/health.svg)

```
[![Health](https://phpackages.com/badges/ajur-media-templateflash/health.svg)](https://phpackages.com/packages/ajur-media-templateflash)
```

PHPackages © 2026

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