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

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

weboptic/laravel-flash-notifications
====================================

Easy way to display Flash Notifications in Laravel 5.

07PHP

Since Oct 17Pushed 2y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

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

[](#laravel-flash-notifications)

Flash Notifications Helper for Laravel 10

Install
-------

[](#install)

### Install via composer

[](#install-via-composer)

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

```
require: {
    "weboptic/laravel-flash-notifications": "1.0"
}

```

### Configure Laravel

[](#configure-laravel)

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

```
'Weboptic\Notifications\NotificationServiceProvider'
```

```
'Flash' => 'Weboptic\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!');
```

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

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity20

Early-stage or recently created project

 Bus Factor1

Top contributor holds 83.3% 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/b179919d269900984b1719c506bdfa49a5f3dd3e2faf2edef5b775377db3a787?d=identicon)[weboptic](/maintainers/weboptic)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[tijsverkoyen/css-to-inline-styles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.

5.8k505.3M227](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M53](/packages/minishlink-web-push)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[spatie/url-signer

Generate a url with an expiration date and signature to prevent unauthorized access

4422.3M16](/packages/spatie-url-signer)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)

PHPackages © 2026

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