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

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

dkpankaj1/toastr
================

A lightweight and customizable Toastr notification service for Laravel.

1.2.0(1y ago)218MITPHPPHP ^8.1|^8.2

Since Mar 2Pushed 1y ago1 watchersCompare

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

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

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

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

A simple Laravel package to display Toastr notifications using Blade components.

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

[](#installation)

### 1. Install via Composer

[](#1-install-via-composer)

Run the following command to install the package:

```
composer require dkpankaj1/toastr
```

### 2. Publish Assets &amp; Views

[](#2-publish-assets--views)

Run the following command to publish the necessary assets and views:

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

This will copy the views and assets to your Laravel application:

- Views: `resources/views/components/toaster.blade.php`
- Assets(css &amp; js): `public/assets/toastr/`

### 3. Register Service Provider (if not auto-discovered)

[](#3-register-service-provider-if-not-auto-discovered)

If your Laravel version does not support auto-discovery, add the service provider manually in `bootstrap/providers.php`:

```
'providers' => [
    Dkpankaj1\Toastr\ToastrServiceProvider::class,
];
```

### 4. Include Assets in Your Layout

[](#4-include-assets-in-your-layout)

Add the following line to your main layout file (e.g., `resources/views/layouts/app.blade.php`):

```

```

Usage
-----

[](#usage)

### 1. Include Toastr in Your Blade Template

[](#1-include-toastr-in-your-blade-template)

Add the following line to your main layout file (e.g., `resources/views/layouts/app.blade.php`):

```

```

### 2. Display Notifications in Controller

[](#2-display-notifications-in-controller)

You can use Laravel's session to flash messages that will be shown via Toastr:

```
use Dkpankaj1\Toastr\Services\ToasterService;

ToasterService::success('success message');
ToasterService::error('error message');
ToasterService::warning('warning message');
ToasterService::info('info message');
```

### 3. Customizing Toastr Options

[](#3-customizing-toastr-options)

Modify `resources/views/components/toaster.blade.php` to customize the notification settings:

Credits
-------

[](#credits)

Developed by **Dkpankaj1**.

License
-------

[](#license)

This package is open-source and licensed under the **MIT License**.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance46

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Total

3

Last Release

406d ago

PHP version history (3 changes)v1.0.0PHP ^8.2

v1.0.1PHP ^8.0|^8.1|^8.2

1.2.0PHP ^8.1|^8.2

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-failed-job-monitor

Get notified when a queued job fails

1.0k2.6M4](/packages/spatie-laravel-failed-job-monitor)[vemcogroup/laravel-sparkpost-driver

SparkPost driver to use with Laravel 6.x|7.x|8.x|9.x|10.x

421.7M1](/packages/vemcogroup-laravel-sparkpost-driver)[spatie/mailcoach

Self-host Mailcoach

4007.0k](/packages/spatie-mailcoach)[synergitech/laravel-postal

This library integrates Postal with the standard Laravel mail framework.

38107.1k](/packages/synergitech-laravel-postal)[motomedialab/smtp2go

Send emails via API using the first-class email courier SMTP2Go

1316.3k](/packages/motomedialab-smtp2go)

PHPackages © 2026

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