定制 salymmbise/toaster 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

salymmbise/toaster

Composer 安装命令:

composer require salymmbise/toaster

包简介

Beautiful colorful toast notifications for PHP & Laravel.

README 文档

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.

统计信息

  • 总下载量: 15
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固