PHPackages                             tegimus/php-izitoast - 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. tegimus/php-izitoast

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

tegimus/php-izitoast
====================

A simple php wrapper for the iziToast javascript library

v1.0(7y ago)21.3k1GPL-3.0PHPPHP &gt;=7.0

Since Aug 5Pushed 6y agoCompare

[ Source](https://github.com/tegimus/php-izitoast)[ Packagist](https://packagist.org/packages/tegimus/php-izitoast)[ RSS](/packages/tegimus-php-izitoast/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)DependenciesVersions (2)Used By (0)

php-izitoast
============

[](#php-izitoast)

A simple php wrapper for the iziToast javascript library

### Requirements

[](#requirements)

PHP 7 or greater

### Installation

[](#installation)

##### Using Composer

[](#using-composer)

```
composer require tegimus/php-izitoast

```

##### Manual

[](#manual)

You can also use the package class file [src/Toast.php](src/Toast.php) directly in your project since it has no other dependencies.

### Adding the iziToast library files

[](#adding-the-izitoast-library-files)

Download the latest iziToast javascript and stylesheet files from [iziToast github repository](https://github.com/dolce/iziToast/archive/master.zip).

Add the iziToast css and js files to your html.

```

        ...

        ...

        ...

```

### Basic Usage

[](#basic-usage)

##### Creating the Toast object

[](#creating-the-toast-object)

Using constructor

```
use Tegimus\IziToast\Toast;

$toast = new Toast();
```

Or using the static make() method

```
$toast = Toast::make();
```

##### Constructor Parameters

[](#constructor-parameters)

The constructor can optionally receive message, title, type and options parameters.

```
$title = 'Test';
$message = 'My sample message';
$type = Toast::TYPE_SUCCESS;
$options = ['progressBar' => false];

$toast = new Toast($message);
//or
$toast = Toast:make($message, $title, $type, $options);
```

##### Display the message

[](#display-the-message)

To show the toast message, simply use the render() function on the Toast object inside javascript in your HTML.

```

  render() ?>

```

Or in string contexts you can simply echo the Toast object

```

```

### Customizing

[](#customizing)

##### Message types

[](#message-types)

You can set the type of the message by calling type() method on the Toast object.

```
$toast->type(Toast::TYPE_ERROR);
```

##### Message options

[](#message-options)

By default, the Toast object will have the below options set.

```
'closeOnEscape' : true
'closeOnClick' : true
'position' : 'topCenter'
'progressBar' : false
'transitionIn' : 'bounceInLeft'

```

To override an option or to add a new one, use the option() method

```
$toast->option('timeout', false);
```

Or specify multiple options at once

```
$toast->mergeOptions([
  'position' => 'bottomRight',
  'timeout' => 6000,
  'pauseOnHover' => false,
]);
```

Or replace all options with the given array. All existing options will be cleared including message and title.

```
$toast->options([
  'message' => 'Sample message',
  'title' => 'Replace',
  'position' => 'bottomRight',
  'timeout' => 6000,
  'pauseOnHover' => false,
]);
```

To clear an option use the clear() method. All options will be cleared if no parameter is specified.

```
//clear 'position' option
$toast->clear('position');
//clear all options
$toast->clear();
```

All types and options available for the iziToast library are documented [here](http://izitoast.marcelodolce.com).

### Extending the Toast class

[](#extending-the-toast-class)

[Read here](EXTENDING.md) to know more about extending and customizing the Toast class

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Unknown

Total

1

Last Release

2838d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1cc62328c89060cf9be3e7f4e773bc7a448530d679576a64802b76b32b15901c?d=identicon)[tegimus](/maintainers/tegimus)

---

Top Contributors

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

---

Tags

notificationpopupizitoast

### Embed Badge

![Health badge](/badges/tegimus-php-izitoast/health.svg)

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

###  Alternatives

[symfony/notifier

Sends notifications via one or more channels (email, SMS, ...)

80640.3M290](/packages/symfony-notifier)[jolicode/jolinotif

Send desktop notifications on Windows, Linux, MacOS.

1.4k11.6M41](/packages/jolicode-jolinotif)[duccio/apns-php

Apple Push Notification &amp; Feedback Provider

1.4k2.5M13](/packages/duccio-apns-php)[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.4M35](/packages/laravel-notification-channels-telegram)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)

PHPackages © 2026

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