PHPackages                             rzl-app/laravel-toaster - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. rzl-app/laravel-toaster

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rzl-app/laravel-toaster
=======================

A clean, powerful Laravel Toaster to generate session flash &amp; props arrays — perfect for Blade, Vue, React, Inertia, Livewire, or plain APIs.

v1.1.0(10mo ago)20MITPHPPHP ^8.2

Since Jul 7Pushed 10mo agoCompare

[ Source](https://github.com/rzl-app/laravel-toaster)[ Packagist](https://packagist.org/packages/rzl-app/laravel-toaster)[ Docs](https://github.com/rzl-app/laravel-toaster)[ RSS](/packages/rzl-app-laravel-toaster/feed)WikiDiscussions main Synced 1mo ago

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

⚡️Rzl Laravel Toaster Message 🚀
===============================

[](#️rzl-laravel-toaster-message-)

```
    __        __              _                  _______
    \ \      / /__  _ __ ___  | |_ ___  ___ ___  \      \   ___ ___  ___
     \ \ /\ / / _ \| '__/ _ \ | __/ _ \/ __/ __| /   |   \ / __/ _ \/ __|
      \ V  V / (_) | | |  __/ | ||  __/\__ \__ \ /    |    \ (_|  __/\__ \
       \_/\_/ \___/|_|  \___|  \__\___||___/___/ \____|__  /\___\___||___/
                                                        \/          \/
                      🚀 Rzl App Laravel Toaster 🚀

```

> A clean, powerful Laravel Session Flash &amp; Props Toaster helper —
> perfect for Blade, Vue, React, Inertia, Livewire, or plain API.
> **Built with ❤️ by [@rzl-app](https://github.com/rzl-app).**

[![Latest Version](https://camo.githubusercontent.com/b3c60f5c7cf11129a0260f0c3bc169bab5d42d1a98272d68cb899974628c8529/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f727a6c2d6170702f6c61726176656c2d746f61737465723f7374796c653d666c61742d726f756e64656426636f6c6f723d677265656e)](https://packagist.org/packages/rzl-app/laravel-toaster)[![Downloads](https://camo.githubusercontent.com/8d928de00bdb768d98dbcfd2773e87ab483018ce1332b3fb056ff32f4d7aad72/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f727a6c2d6170702f6c61726176656c2d746f61737465723f7374796c653d666c61742d726f756e64656426636f6c6f723d626c7565)](https://packagist.org/packages/rzl-app/laravel-toaster)[![PHPStan](https://camo.githubusercontent.com/1fb18cc8ee49b1c75bb0156d1646dbcefb6ab66871ff8f6783f386c0b816de07/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068707374616e2d6c6576656c253230382d627269676874677265656e3f7374796c653d666c61742d726f756e646564)](https://phpstan.org)[![PHP](https://camo.githubusercontent.com/b1a4bb15b7ef375e86b1f23cba08a0954fae3d71e6d81a5e0e5c2b4399191a43/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e322d626c75653f7374796c653d666c61742d726f756e646564)](https://www.php.net)[![Laravel](https://camo.githubusercontent.com/414e2b9664f65539a31b26099327c62e034d2308ed3ac2dc38430b771bf3cf7d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d253545392e7825323025374325323025354531302e7825323025374325323025354531312e7825323025374325323025354531322e782d7265643f7374796c653d666c61742d726f756e646564)](https://laravel.com)[![Illuminate Support](https://camo.githubusercontent.com/60e104323ca0db80c086eefbb437b2e9530aec7f98aaea61dfa5d523df1077c9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696c6c756d696e617465253246737570706f72742d253545392e7825323025374325323025354531302e7825323025374325323025354531312e7825323025374325323025354531322e782d626c75653f7374796c653d666c61742d726f756e646564)](https://packagist.org/packages/illuminate/support)[![Coverage](https://camo.githubusercontent.com/7b7a431054e13a0b8381d41295355ef15b4ece5165a30eceab713dea9521a53b/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f727a6c2d6170702f6c61726176656c2d746f61737465723f7374796c653d666c61742d726f756e646564)](https://codecov.io/gh/rzl-app/laravel-toaster)

---

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

[](#-table-of-contents)

- 🚀 [Requirements](#requirements)
- ⚙️ [Installation](#installation)
- 🔥 [Usage](#usage)
- 🖥 [Blade Example](#blade-example)
- 📝 [JSON Output](#json-output)
- 💡 [Tips &amp; Best Practice](#tips--best-practice)
- ❤️ [Sponsor](#sponsor-this-package)
- 📜 [Changelog](#changelog)
- 🤝 [Contributing](#contributing)
- 🛡 [Security](#security)
- 🙌 [Credits](#credits)
- 📄 [License](#license)

---

🛠 Requirements
--------------

[](#-requirements)

Laravel Framework &amp; `illuminate/support`PHPPackage Version^9.x | ^10.x | ^11.x | ^12.x^8.2v1.1.x^9.x | ^10.x | ^11.x^8.1v1.0.x---

⚙️ Installation
---------------

[](#️-installation)

```
composer require rzl-app/laravel-toaster
```

### Publish config

[](#publish-config)

```
php artisan vendor:publish --tag="RzlLaravelToaster"
```

Will create `config/rzl-laravel-toaster.php`:

```
return [
  /*
  |--------------------------------------------------------------------------
  | Session Flash Name for Toaster
  |--------------------------------------------------------------------------
  |
  | This defines the session key name used to flash the toaster data.
  | It will be retrieved on the frontend after a redirect or page reload.
  |
  | Note: The Value must be string and not empty or only space or as blank
  |       value, if invalid value will return fallback as "toast".
  |
  | Default: 'toast'
  |
  | Example:
  | session()->flash('toast', [...]);
  |
  */
  'session_name'  => "toast",

  /*
  |--------------------------------------------------------------------------
  | Settings Toaster Options As Session Flash or Only Return As Props Array.
  |--------------------------------------------------------------------------
  |
  | Toaster Mode: Flash Session or Return as Props Array
  | Return Format:
  |
  |  * false: `Session` -> `session()->flash("toast", [
  |               $title, $message, $type, $durationClose
  |           ]);`
  |
  |  * true: Props json output or array.
  |
  */
  'as_prop'       => false,
];
```

---

🚀 Usage
-------

[](#-usage)

### ✅ Basic flash

[](#-basic-flash)

```
toaster('Profile saved!');
```

### 🚀 With type &amp; timeout

[](#-with-type--timeout)

```
toaster('Unauthorized action!', 'error', 5000);
toaster('Heads up!', 'warning', 0); // No auto close
```

### 🪄 Shortcuts

[](#-shortcuts)

```
toasterSuccess('Data saved!');
toasterError('Something wrong...');
toasterInfo('Heads up!');
toasterWarning('Careful!');
```

### 🔥 Props for API / SPA

[](#-props-for-api--spa)

```
return [
    'toast' => toasterAsProps('Welcome back!', 'info')
];
```

or shortcuts:

```
return response()->json([
    'toast' => toasterErrorAsProps('Invalid data!')
]);
```

---

🖥 Blade Example
---------------

[](#-blade-example)

```
@if(session('toast'))

    window.toast = @json(session('toast'));
    console.log('Toast:', window.toast);

@endif
```

---

🚀 JSON output
-------------

[](#-json-output)

```
{
  "title": "success_1725459999",
  "message": "Profile updated",
  "type": "success",
  "durationClose": 2000,
  "timeGenerate": 1725459999
}
```

---

💡 Tips &amp; Best Practice
--------------------------

[](#-tips--best-practice)

✅ Use `session` for simple Laravel + Blade / Livewire.
✅ Use `props` for Inertia, SPA, or pure API.
✅ Set `as_prop` true in config to force always JSON array.

---

❤️ Sponsor this package
-----------------------

[](#️-sponsor-this-package)

Help support development:

[👉 Become a sponsor](https://github.com/sponsors/rzl-app)

---

📝 Changelog
-----------

[](#-changelog)

See [CHANGELOG](CHANGELOG.md).

---

🤝 Contributing
--------------

[](#-contributing)

See [CONTRIBUTING](CONTRIBUTING.md).

---

🛡 Security
----------

[](#-security)

Please report issues to .

---

🙌 Credits
---------

[](#-credits)

- [Rzl App](https://github.com/rzl-app)
- [All Contributors](../../contributors)

---

📜 License
---------

[](#-license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

---

✅ **Enjoy using `rzl-app/laravel-toaster`?**
Star this repo ⭐ and share it with other Laravel developers!

---

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance54

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

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

309d ago

PHP version history (2 changes)v1.0.0PHP ^8.1

v1.1.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/d631f4e1637d8f1184390a2a5635d698e1229bb25bffb6eb6b4dab42912d59b3?d=identicon)[rzl-zone](/maintainers/rzl-zone)

---

Top Contributors

[![rzl-app](https://avatars.githubusercontent.com/u/133492532?v=4)](https://github.com/rzl-app "rzl-app (4 commits)")

---

Tags

laravelroutestoasterrzl-applaravel toasterrzl toasterrzl laravel toaster

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rzl-app-laravel-toaster/health.svg)

```
[![Health](https://phpackages.com/badges/rzl-app-laravel-toaster/health.svg)](https://phpackages.com/packages/rzl-app-laravel-toaster)
```

###  Alternatives

[tightenco/ziggy

Use your Laravel named routes in JavaScript.

4.3k41.6M267](/packages/tightenco-ziggy)[sbine/route-viewer

A Laravel Nova tool to view your registered routes.

57215.9k](/packages/sbine-route-viewer)[dragon-code/pretty-routes

Pretty Routes for Laravel

10058.7k4](/packages/dragon-code-pretty-routes)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

116.6k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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