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

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

incloudout/toastr
=================

Laravel 5.4 notifications using toastr

1.2(9y ago)13671MITPHPPHP &gt;=7.0

Since Mar 28Pushed 9y ago1 watchersCompare

[ Source](https://github.com/InCloudOut/toastr)[ Packagist](https://packagist.org/packages/incloudout/toastr)[ RSS](/packages/incloudout-toastr/feed)WikiDiscussions master Synced 2mo ago

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

Laravel Toastr
==============

[](#laravel-toastr)

[![Build Status](https://camo.githubusercontent.com/841b08cbc08936597580a64bdf82148959167cfd05ab1ffe432ea8e07bd52804/68747470733a2f2f7472617669732d63692e6f72672f496e436c6f75644f75742f746f617374722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/InCloudOut/toastr)[![Latest Stable Version](https://camo.githubusercontent.com/009250d8c3b6e970219d6f4a11996e1d3cae3c8124b3c46916102053857af460/68747470733a2f2f706f7365722e707567782e6f72672f696e636c6f75646f75742f746f617374722f762f737461626c65)](https://packagist.org/packages/incloudout/toastr)[![Total Downloads](https://camo.githubusercontent.com/f15f4ba23c94b2624394bfd25e393fc431dcc21c980a1f138fa2c49b85a567cb/68747470733a2f2f706f7365722e707567782e6f72672f696e636c6f75646f75742f746f617374722f646f776e6c6f616473)](https://packagist.org/packages/incloudout/toastr)[![License](https://camo.githubusercontent.com/dffcd8db3526b4cfc1ae075bdd00380f163c280fd72892635e51329e9a3158ac/68747470733a2f2f706f7365722e707567782e6f72672f696e636c6f75646f75742f746f617374722f6c6963656e7365)](https://packagist.org/packages/incloudout/toastr)

Laravel Toastr uses [toastr.js](https://github.com/CodeSeven/toastr) to display flash messages.

Inspired by

**Please note that this package was tunned for Laravel 5.4**

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

[](#installation)

Run `composer require incloudout/toastr` to pull down the latest version of Laravel Toastr.

Edit `config/app.php` add the `provider` and the `alias`

```
'providers' => [
    ...
    InCloudOut\Toastr\ToastrServiceProvider::class,
],
'aliases' => [
    ...
    'Toastr' => InCloudOut\Toastr\Facades\Toastr::class
],

```

##### To install `toastr.js` via `npm`

[](#to-install-toastrjs-via-npm)

Run `npm i --save-dev toastr`

Open `resources/assets/sass/app.scss` and add:

```
...
@import "node_modules/toastr/toastr";

```

Open `resources/assets/js/bootstrap.js` and add:

```
...
window.$ = window.jQuery = require('jquery');

window.toastr = require('toastr');
...

```

Run `npm run dev` for development or `npm run build` for production

##### To require `toastr.js` via `html`

[](#to-require-toastrjs-via-html)

Go to your html master page and add:

```

...

...

```

**Note that `toastr.js` requires `JQuery` as a dependency**

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

[](#configuration)

You can start by publishing the configuration files. Run the following command

```
$ php artisan vendor:publish --provider=InCloudOut\\Toastr\\ToastrServiceProvider

```

You can change the default options with other options, see [toastr.js demo](http://codeseven.github.io/toastr/demo.html) to choose what suits you.

Usage
-----

[](#usage)

Add this code to your blade template file:

```
{!! Toastr::execute() !!}

```

Call one of these methods in your controllers to insert a toast:

- `Toastr::warning($message, $title = null, $options = [])` - to add a warning toast
- `Toastr::error($message, $title = null, $options = [])` - to add an error toast
- `Toastr::info($message, $title = null, $options = [])` - to add an info toast
- `Toastr::success($message, $title = null, $options = [])` - to add a success toast
- `Toastr::add($type = warning|error|info|success, $message, $title = null, $options = [])` - to add a `$type` toast
- **`Toastr::clear()` - clear all current toasts**

Use Laravel's session flash message. Make sure that your configuration `toastr.session` is set to `true`

- Simple usage:

```
    session()->flash('success', 'User Created);

```

- Advanced usage:

```
    session()->flash('success', [
        'message' => 'User Created',
        'title' => 'SUCCESS'
    ]);

```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 90% 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 ~10 days

Total

3

Last Release

3309d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6227379fca0ab0e51f6f1694fff96a2d7a09ca52fdb38446073b5782c95e4228?d=identicon)[hrodrigues1984](/maintainers/hrodrigues1984)

---

Top Contributors

[![hrodrigues1984](https://avatars.githubusercontent.com/u/8711911?v=4)](https://github.com/hrodrigues1984 "hrodrigues1984 (9 commits)")[![thanby](https://avatars.githubusercontent.com/u/1941436?v=4)](https://github.com/thanby "thanby (1 commits)")

---

Tags

laravelnotificationtoastr

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[mckenziearts/laravel-notify

Flexible flash notifications for Laravel

1.7k1.1M5](/packages/mckenziearts-laravel-notify)[brian2694/laravel-toastr

toastr.js for Laravel

136649.4k5](/packages/brian2694-laravel-toastr)[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.4M35](/packages/laravel-notification-channels-telegram)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[oriceon/toastr-5-laravel

Easy toastr notifications for Laravel 5

92473.5k3](/packages/oriceon-toastr-5-laravel)[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)
