PHPackages                             webiik/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. [Mail &amp; Notifications](/categories/mail)
4. /
5. webiik/flash

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

webiik/flash
============

The Flash provides multilingual flash notifications.

1.0(7y ago)07MITPHPPHP &gt;=7.2

Since Feb 28Pushed 7y ago1 watchersCompare

[ Source](https://github.com/webiik/flash)[ Packagist](https://packagist.org/packages/webiik/flash)[ Docs](https://www.webiik.com)[ RSS](/packages/webiik-flash/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

[![](https://camo.githubusercontent.com/a397347ee4fb199934fee6354504f4702b89f5c22f0ce0ba94c5ff691cde545c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f77656269696b2f77656269696b2e737667)](https://camo.githubusercontent.com/a397347ee4fb199934fee6354504f4702b89f5c22f0ce0ba94c5ff691cde545c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f77656269696b2f77656269696b2e737667)[![](https://camo.githubusercontent.com/bdb417a12aecf0f18d2522ead57fa9c3d6f72238f05a20e8169bcd816f5ee809/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646570656e64656e636965732d312d627269676874677265656e2e737667)](https://camo.githubusercontent.com/bdb417a12aecf0f18d2522ead57fa9c3d6f72238f05a20e8169bcd816f5ee809/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646570656e64656e636965732d312d627269676874677265656e2e737667)

Flash
=====

[](#flash)

The Flash provides multilingual flash notifications.

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

[](#installation)

```
composer require webiik/flash
```

Example
-------

[](#example)

```
$flash = new \Webiik\Flash\Flash($session);
$flash->addFlashCurrent('inf', 'Hello {name}', ['name' => 'Dolly']);
$flash->addFlashNext('inf', 'Hello {name}', ['name' => 'Molly']);
print_r($flash->getFlashes()); // Array ([inf] => Array ([0] => Hello Dolly ))
```

Next request:

```
$flash = new \Webiik\Flash\Flash($session);
print_r($flash->getFlashes()); // Array ([inf] => Array ([0] => Hello Molly ))
```

Configuration
-------------

[](#configuration)

### setLang

[](#setlang)

```
setLang(string $lang): void
```

**setLang()** sets current language of flash messages. The default value is **en**.

```
$flash->setLang('en');
```

Adding
------

[](#adding)

### addFlashCurrent

[](#addflashcurrent)

```
addFlashCurrent(string $type, string $message, array $context = []): void
```

**addFlashCurrent()** adds flash message in current language to be displayed in current request. **$type** represents custom type of message e.g. inf, err, ok. The message may contain {placeholders} which will be replaced with values from the **$context** array.

```
$flash->addFlashCurrent('inf', 'Hello {name}', ['name' => 'Dolly']);
```

### addFlashNext

[](#addflashnext)

```
addFlashNext(string $type, string $message, array $context = []): void
```

**addFlashNext()** adds flash message in current language to be displayed in next request. **$type** represents custom type of message e.g. inf, err, ok. The message may contain {placeholders} which will be replaced with values from the **$context** array.

```
$flash->addFlashNext('inf', 'Hello {name}', ['name' => 'Molly']);
```

Getting
-------

[](#getting)

### getFlashes

[](#getflashes)

```
getFlashes(): array
```

**getFlashes()** returns array of all messages to be displayed in current request and language.

```
$flashMessages = $flash->getFlashes();
```

Resources
---------

[](#resources)

- [Webiik framework](https://github.com/webiik/webiik)
- [Report issue](https://github.com/webiik/components/issues)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

2633d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1226362d003d186b45e7dfa44489c36af37196c6a1b476206700eaf4e9c96a5a?d=identicon)[Jiri Mihal](/maintainers/Jiri%20Mihal)

---

Top Contributors

[![Jiri-Mihal](https://avatars.githubusercontent.com/u/10408123?v=4)](https://github.com/Jiri-Mihal "Jiri-Mihal (176 commits)")

---

Tags

notificationsflashmessages

### Embed Badge

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

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

###  Alternatives

[edvinaskrucas/notification

Package for Laravel for helping to manage flash / instant notifications / messages.

520393.9k10](/packages/edvinaskrucas-notification)[tamtamchik/simple-flash

Easy, framework agnostic flash notifications for PHP.

105104.1k5](/packages/tamtamchik-simple-flash)[devmarketer/laraflash

A powerful and flexible flash notifications system. Improving over built-in Laravel Flash messaging functionality.

6310.3k1](/packages/devmarketer-laraflash)[bpocallaghan/notify

Laravel 5 Flash Notifications with icons and animations and with a timeout

3416.6k3](/packages/bpocallaghan-notify)[arcanedev/notify

Flexible flash notifications helper for Laravel.

139.5k1](/packages/arcanedev-notify)

PHPackages © 2026

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