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

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

sun/flash
=========

Flash helps you to add flash messages to your PHP application.

v1.5(10y ago)3531[1 issues](https://github.com/IftekherSunny/Flash/issues)MITPHPPHP &gt;=5.4.0

Since Jul 13Pushed 10y ago2 watchersCompare

[ Source](https://github.com/IftekherSunny/Flash)[ Packagist](https://packagist.org/packages/sun/flash)[ RSS](/packages/sun-flash/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (3)Versions (6)Used By (0)

Flash
-----

[](#flash)

[![Build Status](https://camo.githubusercontent.com/80316c718d4490f62afba56c9d87ed0fb8929bdb3a7f0a2b63f55b629033363c/68747470733a2f2f7472617669732d63692e6f72672f496674656b68657253756e6e792f466c6173682e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/IftekherSunny/Flash) [![Total Downloads](https://camo.githubusercontent.com/db662d685f7008d3573ac97f1526da20f3925ff21a4e22a068c1da8dfb2126c5/68747470733a2f2f706f7365722e707567782e6f72672f73756e2f666c6173682f646f776e6c6f616473)](https://packagist.org/packages/sun/flash) [![Latest Stable Version](https://camo.githubusercontent.com/5fac93327000d42f12995ebb00b53a2181f2a7f0bcc2ed90252ce37744cda2c3/68747470733a2f2f706f7365722e707567782e6f72672f73756e2f666c6173682f762f737461626c65)](https://packagist.org/packages/sun/flash) [![Latest Unstable Version](https://camo.githubusercontent.com/6e44b423e0e5d5127fe593cf9717bc32fcf5f8e57b44d7e5287b65bb8475a903/68747470733a2f2f706f7365722e707567782e6f72672f73756e2f666c6173682f762f756e737461626c65)](https://packagist.org/packages/sun/flash) [![License](https://camo.githubusercontent.com/3ec775c71cd386af3ac2de672c7f8701d4a77d1a6d08ef56e757d2f3cdcf1136/68747470733a2f2f706f7365722e707567782e6f72672f73756e2f666c6173682f6c6963656e7365)](https://packagist.org/packages/sun/flash)

Flash helps you to add flash messages to your PHP application.

Installation Process
--------------------

[](#installation-process)

Just copy Flash folder somewhere into your project directory. Then include flash autoloader.

```
 require_once('/path/to/Flash/autoload.php');
```

Flash is also available via Composer/Packagist.

```
 composer require sun/flash

```

#### Flash Message View Installation Process

[](#flash-message-view-installation-process)

If you install flash manually, just add this line where you want to show flash message.

```
 include('/path/to/Flash/view/flash.php');
```

If you install flash via composer, You need to publish flash message view. To publish flash message view -

```
 php vendor/sun/flash/publish

```

Then, include this view where you want to show flash message.

```
 include('view/Flash_Message.php);
```

In Flash message view I used Bootstrap css framework for flash message styling. You also need to add bootstrap to your project.

###### Bootstrap css, js and jQuery cdn

[](#bootstrap-css-js-and-jquery-cdn)

```

```

Add this line at the bottom of your page

```

    $(function () {
        $('.flash-modal').modal();

    })

```

All Methods
-----------

[](#all-methods)

###### To show success message

[](#to-show-success-message)

```
$flash = new Sun\Flash;
$flash->success('Hello');
```

###### To show error message

[](#to-show-error-message)

```
$flash->error('Whoops! There were some problems with your input.');
```

###### To show info message

[](#to-show-info-message)

```
$flash->info('your message');
```

###### To show warning message

[](#to-show-warning-message)

```
$flash->warning('your message');
```

###### To show confirm message

[](#to-show-confirm-message)

```
$flash->confirm('Message Title', 'Your Message');
```

###### To show bootstrap modal popup message

[](#to-show-bootstrap-modal-popup-message)

```
$flash->overlay(
                 'Message Title',
                 'Your Message',
                 true,
                 'Allow Button Text',
                 'Allow Button Type',
                 'Dismiss Button Text',
                 'Dismiss Button Type
                 );
```

Defalut value for --

```
 Submit Button = false
 Allow Button Text = Save
 Allow Button Type = success
 Dismiss Button Text = Close
 Dismiss Button Type = default

```

Screenshots
-----------

[](#screenshots)

###### Flash Message Overlay:

[](#flash-message-overlay)

[![Overlay view](https://github.com/IftekherSunny/screenshot/raw/master/Flash/overlay.png)](https://github.com/IftekherSunny/screenshot/blob/master/Flash/overlay.png)

###### Flash Message Success:

[](#flash-message-success)

[![Overlay view](https://github.com/IftekherSunny/screenshot/raw/master/Flash/success.png)](https://github.com/IftekherSunny/screenshot/blob/master/Flash/success.png)

###### Flash Message Error:

[](#flash-message-error)

[![Overlay view](https://github.com/IftekherSunny/screenshot/raw/master/Flash/error.png)](https://github.com/IftekherSunny/screenshot/blob/master/Flash/error.png)

License
-------

[](#license)

This package is licensed under the [MIT License](https://github.com/IftekherSunny/flash/blob/master/LICENSE)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Total

5

Last Release

3904d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7d233b865d7b1e1b86271e3bc70ddd077e1c01e4a83124e020fa39199c4af15a?d=identicon)[IftekherSunny](/maintainers/IftekherSunny)

---

Top Contributors

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

---

Tags

messagephplaravelflashbootstrapflash message

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[nahid/talk

Talk is a Laravel based realtime messaging, chatting and conversation system. It helps to develop users messaging, chatting and conversations in easy way.

1.6k58.1k4](/packages/nahid-talk)[baklysystems/laravel-chat-messenger

Laravel chat package

121.8k](/packages/baklysystems-laravel-chat-messenger)

PHPackages © 2026

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