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

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

tijo15/flash-message
====================

Flashmessage module for anax mvc

015PHP

Since Oct 29Pushed 10y ago1 watchersCompare

[ Source](https://github.com/tijo15/flash-message)[ Packagist](https://packagist.org/packages/tijo15/flash-message)[ RSS](/packages/tijo15-flash-message/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/fcd03cf7272ca88ab41f33bafe4404f56dc0b4f1a4249c192c65405198f4975b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74696a6f31352f666c6173682d6d6573736167652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/tijo15/flash-message/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/0676aa3cdc2a4630d13e00c0f3e29c1708e4104b2b9b103e6a47d46393f95319/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74696a6f31352f666c6173682d6d6573736167652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/tijo15/flash-message/?branch=master)[![Build Status](https://camo.githubusercontent.com/7d45612e275b2c36eb433d0bb0bdbefea490db8878071041a8d68898cafa7e67/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74696a6f31352f666c6173682d6d6573736167652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/tijo15/flash-message/build-status/master)

Flash messages
==============

[](#flash-messages)

School project to create a module for the Anax MVC framework.

Flash Messages lets you add flash messages to the Anax mvc. There are 4 different messages which has a css design to them: Approved, Information, Error and Warning.

You can easily add your own messages but you have to specify the design for them in the flash.css file.

**How to install**

1. To install, use composer and add this line: "require": {"tijo15/flash-message": "dev-master" }
2. To access the controller use this in your frontcontroller:

// Include the essential settings.

require **DIR**.'/config.php';

// Create services and inject into the app.

$di = new \\Anax\\DI\\CDIFactoryDefault();

// Adds the Flash controller

$di-&gt;setShared('flashMessages', function() use ($di){ $flashMessages = new tijo15\\FlashMessage\\FlashController($di); return $flashMessages; });

**How to use**

Add the route in your front controller:

// Test Route $app-&gt;router-&gt;add('', function() use ($app) {

```
$app->theme->setTitle("Testing flash");

//Code to test each message, including a default message(Test).
$app->flashMessages->addMessage('Godkänt!', 'success');
$app->flashMessages->addMessage('Information', 'info');
$app->flashMessages->addMessage('Varning!', 'warning');
$app->flashMessages->addMessage('Error', 'error');
$app->flashMessages->addMessage('Test', 'Test');

//Adds the view to display the messages
$app->views->add('flash/flash', [
    'content' => $app->flashMessages->getFlashMessages(),
    ]);

```

});

If you want to add a new message you need to add a background color to flash.css like this

.newmsg { background-color:#f0cb11; }

Make sure that the name in the css corresponds to the name in the addMessage function like this: $app-&gt;flashMessages-&gt;addMessage('Test new msg', 'newmsg');

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/4696cbba89212adcc654a0e90e83614305c5ead3ecd28c6d6672d2d236e4a148?d=identicon)[tijo15](/maintainers/tijo15)

---

Top Contributors

[![tijo15](https://avatars.githubusercontent.com/u/14128458?v=4)](https://github.com/tijo15 "tijo15 (16 commits)")

### Embed Badge

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

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

###  Alternatives

[dachcom-digital/toolbox

Pimcore Project Kickstarter

67133.1k5](/packages/dachcom-digital-toolbox)[lekoala/silverstripe-softdelete

Soft delete extension for SilverStripe

11236.3k](/packages/lekoala-silverstripe-softdelete)

PHPackages © 2026

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