salymmbise/toaster

Beautiful colorful toast notifications for PHP & Laravel.

Maintainers

Package info

github.com/devmpemba/salymmbise-toaster

Homepage

pkg:composer/salymmbise/toaster

Statistics

Installs: 13

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v2.0.2 2026-03-03 05:01 UTC

This package is auto-updated.

Last update: 2026-03-03 05:03:19 UTC


README

A beautiful and colorful toast notification package for PHP and Laravel.
Supports info, success, warning, and danger messages with smooth animations and modern UI.

🚀 Features

  • Beautiful colored toast notifications
  • Icons for each toast type
  • Auto-dismiss animations
  • Works in pure PHP and Laravel
  • Easy to use API
  • Closes on click
  • Publishable assets (CSS + JS)

📦 Installation

Install via Composer:

composer require salymmbise/toaster

💡 Usage in Plain PHP use SalymMbise\Toaster\Toaster;

Toaster::success("Saved successfully!"); Toaster::danger("Something went wrong!"); Toaster::warning("Please check again!"); Toaster::info("This is an information message.");

echo Toaster::render();

Make sure you include this before your HTML tag.

🎯 Usage in Laravel Step 1: Publish assets php artisan vendor:publish --tag=public

This will publish:

public/vendor/toaster/toaster.css public/vendor/toaster/toaster.js

Step 2: Add toaster renderer in your layout

Place this before the closing tag:

@toaster

Step 3: Trigger toasts from your controller

use SalymMbise\Toaster\Toaster;

Toaster::success("Welcome!");
Toaster::info("Profile updated!");
Toaster::warning("Low balance!");
Toaster::danger("Something went wrong!");

```markdown
🎨 Available Toast Types
Method	Color	Example
Toaster::info()	Purple	Information messages
Toaster::success()	Green	Success actions
Toaster::warning()	Orange	Warnings
Toaster::danger()	Red	Errors or danger alerts
📂 Folder Structure

src/
  Toaster.php
  ToasterServiceProvider.php
  Views/toast.php

public/
  toaster.css
  toaster.js

```markdown
📝 License

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

Salym Mbise
📧 Email: salymdeveloper@gmail.com
🌍 Dar Es Salaam, Tanzania

❤️ Enjoy using SalymMbise Toaster!

Simple. Beautiful. Powerful.