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

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

mujhtech/nav-toastr
===================

nav-toastr flash notification with custom redirection for laravel app

v1.10(5y ago)08MITPHPPHP &gt;=7.2.0

Since Jun 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Mujhtech/laravel-navtoastr)[ Packagist](https://packagist.org/packages/mujhtech/nav-toastr)[ RSS](/packages/mujhtech-nav-toastr/feed)WikiDiscussions master Synced 3w ago

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

NavToastr Notifications and Custom Redirection for Laravel App
==============================================================

[](#navtoastr-notifications-and-custom-redirection-for-laravel-app)

> [![](https://camo.githubusercontent.com/91daa115f117edaea03d45412c89d5725aaefe4521c209b98cdea85c2fdf19ba/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f6d756a68746563682f696d6167652f75706c6f61642f76313632343631323937312f415f706f77657266756c5f616e645f666c657869626c655f666c6173685f6e6f74696669636174696f6e5f776974685f637573746f6d5f7265646972656374696f6e5f727535727a332e706e67)](https://camo.githubusercontent.com/91daa115f117edaea03d45412c89d5725aaefe4521c209b98cdea85c2fdf19ba/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f6d756a68746563682f696d6167652f75706c6f61642f76313632343631323937312f415f706f77657266756c5f616e645f666c657869626c655f666c6173685f6e6f74696669636174696f6e5f776974685f637573746f6d5f7265646972656374696f6e5f727535727a332e706e67)

👀 This package helps you to add [Toast.js](https://github.com/ireade/Toast.js) notifications to your Laravel app

 [![Latest Stable Version](https://camo.githubusercontent.com/a1256c2116583625849a05c353878104b30a166d984b2e0dcc5e2ed4e3f485d3/687474703a2f2f706f7365722e707567782e6f72672f6d756a68746563682f6e61762d746f617374722f76)](https://packagist.org/packages/mujhtech/nav-toastr) [![Latest Unstable Version](https://camo.githubusercontent.com/17bf453dd34b548066a1c768fd7c13cb30929f804c2d679e0de37e2288302939/687474703a2f2f706f7365722e707567782e6f72672f6d756a68746563682f6e61762d746f617374722f762f756e737461626c65)](https://packagist.org/packages/mujhtech/nav-toastr) [![Build Status](https://camo.githubusercontent.com/fffccc79e699964f115ecffb253c3cae6c88ee23809fb400fdfbff546c98996b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4d756a68746563682f6c61726176656c2d6e6176746f617374722f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Mujhtech/laravel-navtoastr/build-status/master) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/39d8520b2f210e2bd0e46a4c053864b2452bdde457a7ee108455c06012d4be96/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4d756a68746563682f6c61726176656c2d6e6176746f617374722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Mujhtech/laravel-navtoastr/?branch=master) [![Code Coverage](https://camo.githubusercontent.com/539aff25c498dede555c68eac1b1183d3df8bb19e668a3f219bffeb12cdfa93f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4d756a68746563682f6c61726176656c2d6e6176746f617374722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Mujhtech/laravel-navtoastr/?branch=master) [![Total Downloads](https://camo.githubusercontent.com/3391040d6365dceb2bbbbbbe2339484d3297f0ac277b5fd9f9f932365ebf3479/687474703a2f2f706f7365722e707567782e6f72672f6d756a68746563682f6e61762d746f617374722f646f776e6c6f616473)](https://packagist.org/packages/mujhtech/nav-toastr) [![License](https://camo.githubusercontent.com/e73f98319e1e2ecf233ce90a3dbe1fcbd048f2f1d2a90fccd9a1f564adf522ff/687474703a2f2f706f7365722e707567782e6f72672f6d756a68746563682f6e61762d746f617374722f6c6963656e7365)](https://packagist.org/packages/mujhtech/nav-toastr)

Install
-------

[](#install)

You can install the package using composer

```
$ composer require mujhtech/nav-toastr
```

Then add the service provider to `config/app.php`. In Laravel versions 5.5 and beyond, this step can be skipped if package auto-discovery is enabled.

```
'providers' => [
    ...
    Mujhtech\NavToastr\NavToastrServiceProvider::class
    ...
];
```

To install the configuration and assets file run:

```
$ php artisan navtoastr:install"
```

Usage:
------

[](#usage)

Include \[app.css\] and [app.js](https://github.com/ireade/Toast.js) in your view template:

1. Link to app.css `` or `@navtoastrCss`
2. Link to app.js `` or `@navtoastrJs`
3. use `navtoastr()` helper function inside your controller to set a toast notification for info, success, warning or error

```
// Display an info toast with no title
navtoastr()->info('Are you the 6 fingered man?')
```

as an example:

```
