PHPackages                             jeybin/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. jeybin/toastr

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jeybin/toastr
=============

Simple helper for php-flasher

v1.0.3(3y ago)31.4k↓50%1[1 issues](https://github.com/jeybin/toastr/issues)MITPHP

Since Jan 22Pushed 3y ago1 watchersCompare

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

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

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

[](#toastr-notifications-for-laravel)

Toastr for Laravel is a wrapper around the popular php-flasher library, providing an easy-to-use interface for displaying notifications in your Laravel application. It includes a service provider, a facade, and a helper function to make it easy to use Toastr in your views and controllers.With Laravel Toastr, you can easily display toast messages on your website with minimal configuration.

### Requirements

[](#requirements)

- PHP 7.2 or higher
- Laravel 5.5 or higher

### Installation

[](#installation)

To install Toastr for Laravel, simply run the following command:

```
  composer require jeybin/toastr
```

After installing the package, run the following command

```
  php artisan toastr:install
```

This will copy the configuration file to config/jeybin-toastr.php

### Usage

[](#usage)

To use Laravel Toastr in your Laravel application, simply use the Toastr facade Jeybin\\Toastr\\Toastr to display a notification:

```
\Jeybin\Toastr\Toastr::success('Your message here')->toast();
```

You can also use other notification types like error, warning, and info:

```
\Jeybin\Toastr\Toastr::error('Your error message here')->toast();
\Jeybin\Toastr\Toastr::warning('Your warning message here')->toast();
\Jeybin\Toastr\Toastr::info('Your info message here')->toast();
```

Another option is to redirect to a different page and display a notification there as well.

The $route variable can either be a whole url, a named route, or empty/null. It will perform redirect()-&gt;back() with notification if it is empty or null.

```
  return \Jeybin\Toastr\Toastr::success('Hello world')->redirect($route);
```

The config/jeybin-toastr.php file makes it simple to add or modify the redirection status code. Alternatively, you may supply the status code by using the syntax shown below: $statusCode must be an integer; the default value is 302.

```
  return \Jeybin\Toastr\Toastr::success('Hello world')
               ->redirectStatusCode($statusCode)
               ->redirect($route);
```

### Customization

[](#customization)

Laravel Toastr supports customization of the notification style, position, animation, and more. The configurations can be changed from the config/jeybin-toastr.php

```
return [
    /**
     * Time out in seconds
     */
    'timeout'=>1000,

    /**
     * show close button
     */
    'show_close_btn'=>true,

    /**
     * show progress bar
     */
    'show_progress_bar'=>true,

    /**
     * Prevent showing duplicate notifications
     */
    'prevent_duplicates'=>true,

    /**
     * Redirect status code default : 302
     */
    'redirect_status_code'=>302

];
```

Or you can change the configurations from by the time of function call itself :

```
\Jeybin\Toastr\Toastr::success('message')
      ->closeBtn(false)
      ->progressBar(false)
      ->preventDuplicates(false)
      ->rtl(true)
      ->timeOut(1500)
      ->toast();
```

- closeBtn(boolean) - Default : true
- progressBar(boolean) - Default : true
- preventDuplicates(boolean) - Default : true
- rtl(boolean) - Default : false
- timeOut(integer) - Default : 1000
- redirectStatusCode(integer) - default : 302 use if you are using the redirect function

### Features

[](#features)

- Easy to install and configure.
- Compatible with Laravel 5.6 and above.
- Highly customizable: change the style, position, animation, and more.
- Responsive: works on all devices and screen sizes.
- Lightweight: only 7kb minified and gzipped.

### Contributing

[](#contributing)

If you would like to contribute to Laravel Toastr, please feel free to submit a pull request or open an issue on the GitHub page.

### License

[](#license)

Laravel Toastr is released under the MIT License.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

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

Total

4

Last Release

1187d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/43aa6da4b21c153b17508135de7fde9f34ee9c2f532d64dc0cca1b82ee973307?d=identicon)[jeybin](/maintainers/jeybin)

---

Tags

laravelnotificationphpphp-flasher

### Embed Badge

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

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

###  Alternatives

[datatables.net/datatables.net

DataTables is a plug-in for the jQuery Javascript library. It is a highly flexible tool, based upon the foundations of progressive enhancement, which will add advanced interaction controls to any HTML table. This is jQuery DataTables

56156.5k25](/packages/datatablesnet-datatablesnet)[ahuggins/open-on-make

Automatically open files in editor when Artisan make:\* is executed

9920.0k](/packages/ahuggins-open-on-make)[caouecs/sirtrevorjs

Sir Trevor JS in Laravel project

5421.6k](/packages/caouecs-sirtrevorjs)[timoetting/kirby-color

Kirby-Color is a color picker plugin for Kirby CMS v3.

4618.0k](/packages/timoetting-kirby-color)[rezzza/shorty

Underwear for your long urls

1315.3k1](/packages/rezzza-shorty)

PHPackages © 2026

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