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

ActiveLibrary

hepplerdotnet/flash-toastr
==========================

Easy toastr.js flash notifications

5.6.1.1(7y ago)04.3kMITPHPPHP &gt;=5.6.0

Since May 12Pushed 7y ago1 watchersCompare

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

READMEChangelog (3)Dependencies (1)Versions (3)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/82d4324d0173102159779da7e96997d51ff5836482c2834ce273564bbc932c0a/68747470733a2f2f706f7365722e707567782e6f72672f686570706c6572646f746e65742f666c6173682d746f617374722f762f737461626c65)](https://packagist.org/packages/hepplerdotnet/flashtoastr)[![License](https://camo.githubusercontent.com/466b6b918433efb85146b7e22c2d6a47c829087dcdce4ebd29ffdb980c29ed53/68747470733a2f2f706f7365722e707567782e6f72672f686570706c6572646f746e65742f666c6173682d746f617374722f6c6963656e7365)](https://packagist.org/packages/hepplerdotnet/flash-toastr)[![Total Downloads](https://camo.githubusercontent.com/ebcedc262b0f096473e652c8efd4cd9b1205c4f25b3aae4c38305fc9f97948dd/68747470733a2f2f706f7365722e707567782e6f72672f686570706c6572646f746e65742f666c6173682d746f617374722f646f776e6c6f616473)](https://packagist.org/packages/hepplerdotnet/flash-toastr)

Flash Toastr
============

[](#flash-toastr)

Flash Laravel Session Messages to Toastr.js

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

[](#installation)

First, pull in the package through Composer.

Run `composer require HepplerDotNet/flash-toastr`

### Only needed for Laravel &lt; 5.6

[](#only-needed-for-laravel--56)

And then include the service provider within `config/app.php`.

```
'providers' => [
    HepplerDotNet\FlashToastr\FlashServiceProvider::class,
];
```

And, for convenience, add a facade alias to this same file at the bottom:

```
'aliases' => [
    'Flash' => HepplerDotNet\FlashToastr\Flash::class,
];
```

Usage
-----

[](#usage)

Within your controllers, before you perform a redirect...

```
public function store()
{
    Flash::success('Welcome Aboard!','FlashToastr was successfully installed');

    return Redirect::home();
}
```

You may also do:

- `Flash::info('Title','Message')`
- `Flash::success('Title','Message')`
- `Flash::error('Title','Message')`
- `Flash::warning('Title','Message')`
- `Flash::notify('Title', 'Message','Level')`

This will set a few keys in the session:

- 'flash\_notification.title' - The message title you're flashing
- 'flash\_notification.message' - The message you're flashing
- 'flash\_notification.level' - A string that represents the type of notification (good for applying CSS/Bootstrap class names)

Alternatively you may reference the `flash()` helper function, instead of the facade. Here's an example:

```
/**
 * Destroy the user's session (logout).
 *
 * @return Response
 */
public function destroy()
{
    Auth::logout();

    flash()->success('Logout successfull','You have been logged out.');

    return home();
}
```

You can even chain them to flash multiple messages at once.

```
/**
 * Destroy the user's session (logout).
 *
 * @return Response
 */
public function destroy()
{
    Auth::logout();

    flash()->success('Logout successfull','You have been logged out.')
    ->warning('Close Browser','You should close this Browser window now');

    return home();
}
```

With this messages flashed to the session, you may now display it in your view(s).

```
@include('flash-toastr::message')
```

This will include the message.blade.php in to your view.

If you need to modify the flash message partials, you can run:

```
php artisan vendor:publish --tag=flash-views
```

The message view will now be located in the `resources/views/vendor/flash-toastr/` directory.

### JavaScript Options for toastr.js

[](#javascript-options-for-toastrjs)

You can pass an array of options, which will be used to setup toastr.js

```
{{ Config::set('flash-toastr.options', ['progressBar' => false,'positionClass' => 'toast-top-left']) }}
```

You can also publish the config file:

```
php artisan vendor:publish --tag=flash-config
```

To publish both, config and views you can run:

```
php artisan vendor:publish --tag=flash
```

See [Toastr Documentation](http://codeseven.github.io/toastr/demo.html) for all available options

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Every ~163 days

Total

2

Last Release

2765d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11120.2M21](/packages/anourvalar-eloquent-serialize)[namu/wirechat

A Laravel Livewire messaging app for teams with private chats and group conversations.

54324.5k](/packages/namu-wirechat)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)

PHPackages © 2026

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