PHPackages                             szykra/laravel-flash-notifications - 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. szykra/laravel-flash-notifications

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

szykra/laravel-flash-notifications
==================================

Easy way to display Flash Notifications in Laravel 5.

0.3.3(10y ago)838.4k3MITPHPPHP &gt;=5.4.0

Since Jul 12Pushed 10y ago3 watchersCompare

[ Source](https://github.com/skrajewski/laravel-flash-notifications)[ Packagist](https://packagist.org/packages/szykra/laravel-flash-notifications)[ RSS](/packages/szykra-laravel-flash-notifications/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (9)Used By (0)

Laravel Flash Notifications
===========================

[](#laravel-flash-notifications)

[![build](https://camo.githubusercontent.com/d3c9917369585d4951dae4f6b1b7e8bcdac0df618ff3d032a270feee0e32d13e/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f736b72616a6577736b692f6c61726176656c2d666c6173682d6e6f74696669636174696f6e732e737667)](https://travis-ci.org/skrajewski/laravel-flash-notifications)[![version](https://camo.githubusercontent.com/6dc71b19cd32ce96aeaafae5f0285157f181c229e3bd6113ea3b893d855e4cdb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f737a796b72612f6c61726176656c2d666c6173682d6e6f74696669636174696f6e732e737667)](https://packagist.org/packages/szykra/laravel-flash-notifications)[![license](https://camo.githubusercontent.com/f38f6f4a34f92a463dc39d92d06154f45c2ca9b9741ec6295f71730ae828b40f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f737a796b72612f6c61726176656c2d666c6173682d6e6f74696669636174696f6e732e737667)](https://camo.githubusercontent.com/f38f6f4a34f92a463dc39d92d06154f45c2ca9b9741ec6295f71730ae828b40f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f737a796b72612f6c61726176656c2d666c6173682d6e6f74696669636174696f6e732e737667)[![downloads](https://camo.githubusercontent.com/f5b5a40dececa228cab2478d21645b98c5a57a6427e81989d0eef99b8023b37c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f737a796b72612f6c61726176656c2d666c6173682d6e6f74696669636174696f6e732e737667)](https://camo.githubusercontent.com/f5b5a40dececa228cab2478d21645b98c5a57a6427e81989d0eef99b8023b37c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f737a796b72612f6c61726176656c2d666c6173682d6e6f74696669636174696f6e732e737667)

Flash Notifications Helper for Laravel 5

Install
-------

[](#install)

### Install via composer

[](#install-via-composer)

Add dependency to your `composer.json` file and run `composer update`.

```
require: {
    "szykra/laravel-flash-notifications": "~0.3"
}

```

### Configure Laravel

[](#configure-laravel)

Add ServiceProvider and Alias *(Facade)* to your `config/app.php` file:

```
'Szykra\Notifications\NotificationServiceProvider'
```

```
'Flash' => 'Szykra\Notifications\Flash'
```

### Include default alert view to your layout

[](#include-default-alert-view-to-your-layout)

Package default provides *bootstrap ready* alert view. Just include `notifications::flash` file to your main layout in blade:

```
@include('notifications::flash')
```

You can create own container for flash notifications with own custom styles. See *Custom alert view* section.

Usage
-----

[](#usage)

You can push flash message ever you need by facade `Flash`. It provides 4 alert types:

- success
- error
- warning
- info

```
Flash::info('Your alert message here!');
```

Method `push()` exists because you can push more than one alert at the same time. *See below*.

Every alert method takes 1 or 2 arguments. If you give one parameter it will be *message*. If you provide two parameters, first will be *title* and second will be *message*.

```
Flash::success('User has been updated successfully.');
Flash::error('Oh snap!', 'Something went wrong. Please try again for a few seconds.');
```

Custom alert view
-----------------

[](#custom-alert-view)

Package default provides *bootstrap ready* view for alerts. You can define own style for it. Just create new *blade* template file!

```
@if(Session::has('flash.alerts'))
    @foreach(Session::get('flash.alerts') as $alert)

            &times;

            @if( ! empty($alert['title']))
                {{ $alert['title'] }}
            @endif

            {{ $alert['message'] }}

    @endforeach
@endif
```

All alerts will be in `flash.alerts` session variable. Single alert looks like:

```
[
  'title' => 'Title',
  'message' => 'Example message',
  'level' => 'success'
]
```

*Level* for all alerts are following:

- `Flash::success` has level *success*
- `Flash::error` has level *danger*
- `Flash::warning` has level *warning*
- `Flash::info` has level *info*

License
-------

[](#license)

The MIT License. Copyright (c) 2014 - 2015 Szymon Krajewski.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.2% 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 ~93 days

Recently: every ~132 days

Total

7

Last Release

3769d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a82bc574f08a6357c22ba7ab58687c0e6c61c793b6db362128f23e938237baac?d=identicon)[skrajewski](/maintainers/skrajewski)

---

Top Contributors

[![skrajewski](https://avatars.githubusercontent.com/u/4791560?v=4)](https://github.com/skrajewski "skrajewski (25 commits)")[![youanden](https://avatars.githubusercontent.com/u/183880?v=4)](https://github.com/youanden "youanden (1 commits)")

---

Tags

alertfacadeflash-notificationslaravelphplaravelnotificationsflashbootstrapalertsmessages

### Embed Badge

![Health badge](/badges/szykra-laravel-flash-notifications/health.svg)

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

###  Alternatives

[edvinaskrucas/notification

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

520393.9k10](/packages/edvinaskrucas-notification)[mckenziearts/laravel-notify

Flexible flash notifications for Laravel

1.7k1.1M5](/packages/mckenziearts-laravel-notify)[prologue/alerts

Prologue Alerts is a package that handles global site messages.

3486.1M30](/packages/prologue-alerts)[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)
