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

ActiveLibrary

taylornetwork/toastr
====================

A laravel class that will generate Toastr messages using toastr.js

1.0.1(7y ago)026PHPPHP &gt;=7.1

Since Nov 16Pushed 7y ago1 watchersCompare

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

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

Toastr for Laravel
==================

[](#toastr-for-laravel)

A simple facade for Laravel 5 to generate toastr message using [toastr.js](https://github.com/CodeSeven/toastr).

Install
-------

[](#install)

Via Composer

```
$ composer require taylornetwork/toastr
```

Dependencies
------------

[](#dependencies)

You will need to include `toastr.js` on your pages.

You can install using bower

```
$ bower install toastr
```

or include from CDNjs.

```

```

*This may not be the most up to date information, see [CodeSeven/toastr](https://github.com/CodeSeven/toastr)*

Setup
-----

[](#setup)

### Provider Setup

[](#provider-setup)

Add the service provider to the providers array in your `config/app.php`

```
'providers' => [

    TaylorNetwork\Toastr\ToastrServiceProvider::class,

],
```

### Facade Setup

[](#facade-setup)

Add the `Toastr` facade to your aliases array in `config/app.php`

While this is optional, it is greatly recommended because `Toastr::render()` will be used in your base view and is easier than having to include the `Toastr` class.

```
'aliases' => [

    'Toastr' => TaylorNetwork\Toastr\Facades\Toastr::class,

],
```

### Publishing Config

[](#publishing-config)

```
$ php artisan vendor:publish
```

Will add `config/toastr.php` to your project.

### View Setup

[](#view-setup)

You will need to include the `toastr.js` and `toastr.css` files from bower or CDNjs (see *Dependencies* section above) in your base views.

You will also need to add the following line after both files are included in order to render Toastr messages.

```
// app.blade.php

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

Usage
-----

[](#usage)

Include `TaylorNetwork\Toastr\Facades\Toastr` in what ever class you plan on generating a Toastr message.

By default the styles available are `success`, `error`, `info`, `warning`. But you can remove any in `config/toastr.php`

`TaylorNetwork\Toastr\Toastr` uses a magic method to generate toastr messages.

To generate a success message

```
Toastr::success('Congratulations!');
```

Will push a success message to the session and will appear on the next request.

The magic method accepts a minimum of one parameter, the text you want to be displayed. The optional second parameter is the title of the message.

---

To add a custom title to the toastr message

```
Toastr::info('This is information!', 'New Info!!!');
```

Credits
-------

[](#credits)

- Main Author: [Sam Taylor](https://github.com/taylornetwork)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

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

Total

2

Last Release

2571d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.4.0

1.0.1PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/83340094473f0bf5b2cf062bf394df221a52a30aa0e21cd0a77302977d6393ce?d=identicon)[samueljtaylor](/maintainers/samueljtaylor)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.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)
