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 today

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

30

—

LowBetter than 62% of packages

Maintenance42

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

461d 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://avatars.githubusercontent.com/u/34406638?v=4)[Dipankar kumar pankaj](/maintainers/dkpankaj1)[@dkpankaj1](https://github.com/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.1k2.8M4](/packages/spatie-laravel-failed-job-monitor)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[api-platform/laravel

API Platform support for Laravel

58171.5k14](/packages/api-platform-laravel)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3416.9k](/packages/duncanmcclean-statamic-cargo)

PHPackages © 2026

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