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

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

hilalahmad/php-toastr
=====================

The PHP Toastr package is a user-friendly and lightweight PHP library designed to create simple and stylish notification messages in web applications. It offers a convenient way to display various types of notifications, such as success messages, error alerts, information pop-ups, and more, in a visually appealing manner to enhance the user experience.

1.1.0(2y ago)0515MITCSSPHP ^8.0

Since Nov 6Pushed 2y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (3)Used By (0)

php-toastr Package
==================

[](#php-toastr-package)

 *A PHP package for displaying beautiful toast notifications*

 [ ![GitHub issues](https://camo.githubusercontent.com/6ff4b2da2f4f935ecf6c63094ef3bc814586f141715ddf97040cc4358d287545/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f66756c6c737461636b3132342f7068702d746f61737472) ](https://github.com/fullstack124/php-toastr/issues) [ ![GitHub stars](https://camo.githubusercontent.com/b452aadb2800be7b2ea3fcb37b565ff51edc76e0d801ad1788620d93807779ad/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f66756c6c737461636b3132342f7068702d746f61737472) ](https://github.com/fullstack124/php-toastr/stargazers) [ ![Total Downloads](https://camo.githubusercontent.com/0947be1a13b662bd9ee08e7d4f8d34093dfa7d3cfa74b96bcaf40869090185ae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f66756c6c737461636b3132342f7068702d746f61737472) ](https://packagist.org/packages/fullstack124/php-toastr) [ ![License](https://camo.githubusercontent.com/a459a8fc11d097cf4bbc318166ee020798e04878cb0a5bbb9407b8c3161d6cc2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f66756c6c737461636b3132342f7068702d746f61737472) ](https://github.com/fullstack124/php-toastr/blob/main/LICENSE)

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
    - [Basic Usage](#basic-usage)
    - [Notification Styles](#notification-styles)
        - [Success](#success)
        - [Dark](#dark)
        - [Danger](#danger)
        - [Warning](#warning)
        - [Info](#info)
        - [Pink](#pink)
- [Contribution](#contribution)
- [License](#license)

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

[](#installation)

You can install this package using Composer, a popular PHP package manager:

```
composer require hilalahmad/php-toastr
```

Basic Usage
-----------

[](#basic-usage)

To use this package for displaying toast notifications, simply include it in your PHP code:

```
use Hilalahmad\PhpToastr\Toastr;

$toastr=new Toastr();
$toastr->success('Lorem ipsum dolor sit');
```

Or

```
use Hilalahmad\PhpToastr\Toastr;

Toastr::success('Lorem ipsum dolor sit');
```

Notification Styles
-------------------

[](#notification-styles)

You can display toast notifications in various styles, including:

### Success

[](#success)

```
$toastr->success('Lorem ipsum dolor sit','topLeft');
$toastr->success('Lorem ipsum dolor sit','topRight');
$toastr->success('Lorem ipsum dolor sit','bottomLeft');
$toastr->success('Lorem ipsum dolor sit','bottomRight');
$toastr->success('Lorem ipsum dolor sit','topCenter');
$toastr->success('Lorem ipsum dolor sit','bottomCenter');
```

Or

```
Toastr::success('Lorem ipsum dolor sit','topLeft');
Toastr::success('Lorem ipsum dolor sit','topRight');
Toastr::success('Lorem ipsum dolor sit','bottomLeft');
Toastr::success('Lorem ipsum dolor sit','bottomRight');
Toastr::success('Lorem ipsum dolor sit','topCenter');
Toastr::success('Lorem ipsum dolor sit','bottomCenter');
```

### Danger

[](#danger)

```
$toastr->danger('Lorem ipsum dolor sit','topLeft');
$toastr->danger('Lorem ipsum dolor sit','topRight');
$toastr->danger('Lorem ipsum dolor sit','bottomLeft');
$toastr->danger('Lorem ipsum dolor sit','bottomRight');
$toastr->danger('Lorem ipsum dolor sit','topCenter');
$toastr->danger('Lorem ipsum dolor sit','bottomCenter');
```

Or

```
Toastr::danger('Lorem ipsum dolor sit','topLeft');
Toastr::danger('Lorem ipsum dolor sit','topRight');
Toastr::danger('Lorem ipsum dolor sit','bottomLeft');
Toastr::danger('Lorem ipsum dolor sit','bottomRight');
Toastr::danger('Lorem ipsum dolor sit','topCenter');
Toastr::danger('Lorem ipsum dolor sit','bottomCenter');
```

### Dark

[](#dark)

```
$toastr->dark('Lorem ipsum dolor sit','topLeft');
$toastr->dark('Lorem ipsum dolor sit','topRight');
$toastr->dark('Lorem ipsum dolor sit','bottomLeft');
$toastr->dark('Lorem ipsum dolor sit','bottomRight');
$toastr->dark('Lorem ipsum dolor sit','topCenter');
$toastr->dark('Lorem ipsum dolor sit','bottomCenter');
```

Or

```
Toastr::dark('Lorem ipsum dolor sit','topLeft');
Toastr::dark('Lorem ipsum dolor sit','topRight');
Toastr::dark('Lorem ipsum dolor sit','bottomLeft');
Toastr::dark('Lorem ipsum dolor sit','bottomRight');
Toastr::dark('Lorem ipsum dolor sit','topCenter');
Toastr::dark('Lorem ipsum dolor sit','bottomCenter');
```

### Warning

[](#warning)

```
$toastr->warning('Lorem ipsum dolor sit','topLeft');
$toastr->warning('Lorem ipsum dolor sit','topRight');
$toastr->warning('Lorem ipsum dolor sit','bottomLeft');
$toastr->warning('Lorem ipsum dolor sit','bottomRight');
$toastr->warning('Lorem ipsum dolor sit','topCenter');
$toastr->warning('Lorem ipsum dolor sit','bottomCenter');
```

Or

```
Toastr::warning('Lorem ipsum dolor sit','topLeft');
Toastr::warning('Lorem ipsum dolor sit','topRight');
Toastr::warning('Lorem ipsum dolor sit','bottomLeft');
Toastr::warning('Lorem ipsum dolor sit','bottomRight');
Toastr::warning('Lorem ipsum dolor sit','topCenter');
Toastr::warning('Lorem ipsum dolor sit','bottomCenter');
```

### Info

[](#info)

```
$toastr->info('Lorem ipsum dolor sit','topLeft');
$toastr->info('Lorem ipsum dolor sit','topRight');
$toastr->info('Lorem ipsum dolor sit','bottomLeft');
$toastr->info('Lorem ipsum dolor sit','bottomRight');
$toastr->info('Lorem ipsum dolor sit','topCenter');
$toastr->info('Lorem ipsum dolor sit','bottomCenter');
```

Or

```
Toastr::info('Lorem ipsum dolor sit','topLeft');
Toastr::info('Lorem ipsum dolor sit','topRight');
Toastr::info('Lorem ipsum dolor sit','bottomLeft');
Toastr::info('Lorem ipsum dolor sit','bottomRight');
Toastr::info('Lorem ipsum dolor sit','topCenter');
Toastr::info('Lorem ipsum dolor sit','bottomCenter');
```

### Pink

[](#pink)

```
$toastr->pink('Lorem ipsum dolor sit','topLeft');
$toastr->pink('Lorem ipsum dolor sit','topRight');
$toastr->pink('Lorem ipsum dolor sit','bottomLeft');
$toastr->pink('Lorem ipsum dolor sit','bottomRight');
$toastr->pink('Lorem ipsum dolor sit','topCenter');
$toastr->pink('Lorem ipsum dolor sit','bottomCenter');
```

Or

```
Toastr::pink('Lorem ipsum dolor sit','topLeft');
Toastr::pink('Lorem ipsum dolor sit','topRight');
Toastr::pink('Lorem ipsum dolor sit','bottomLeft');
Toastr::pink('Lorem ipsum dolor sit','bottomRight');
Toastr::pink('Lorem ipsum dolor sit','topCenter');
Toastr::pink('Lorem ipsum dolor sit','bottomCenter');
```

Contribution
------------

[](#contribution)

If you'd like to contribute to this package or report issues, please check the [ Github repo](https://github.com/fullstack124/php-toastr/issues) for more details.

License
-------

[](#license)

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

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Total

2

Last Release

917d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8130aa2a0353184f190feb106a6c11f57afa8872ec9e15e75b782d9e03dc5bde?d=identicon)[hilal ahmad](/maintainers/hilal%20ahmad)

---

Top Contributors

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

---

Tags

toastrphptoastrphpalertci4alert

### Embed Badge

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

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

###  Alternatives

[brian2694/laravel-toastr

toastr.js for Laravel

136649.4k5](/packages/brian2694-laravel-toastr)[oriceon/toastr-5-laravel

Easy toastr notifications for Laravel 5

92473.5k3](/packages/oriceon-toastr-5-laravel)[loveorigami/yii2-notification-wrapper

This module for renders a message from session flash (with ajax, pjax support and etc.)

77199.7k5](/packages/loveorigami-yii2-notification-wrapper)[php-flasher/flasher-toastr-laravel

Leverage Toastr for stylish toast notifications in Laravel with PHPFlasher. Add Toastr's sleek notifications to your Laravel projects effortlessly.

31586.1k5](/packages/php-flasher-flasher-toastr-laravel)[helmesvs/laravel-notify

Elegant notifications to laravel with Toastr or PNotify

6127.3k](/packages/helmesvs-laravel-notify)[odaialali/yii2-toastr

This is the Toastr extension for Yii 2. It encapsulates Toastr plugin in terms of Yii widgets, and makes ajax notification easy to implement.

1486.3k](/packages/odaialali-yii2-toastr)

PHPackages © 2026

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