saicoder/alert
最新稳定版本:v1.0.0
Composer 安装命令:
composer require saicoder/alert
包简介
A reusable Laravel toast notification package for displaying elegant alerts using Blade and JavaScript.
README 文档
README
A simple, reusable Laravel package for showing beautiful toast alerts using Blade.
Easy to configure, easy to use — no JavaScript library required.
🚀 Installation
1️⃣ Require the package
composer require saicoder/alert
2️⃣ Add to your main Blade layout
@include('alert::alert')
3️⃣ Use in controller
use Saicoder\Alert\Facades\Alert; Alert::success('Your toast is working!'); Alert::danger('Your toast is working!'); Alert::info('Your toast is working!'); Alert::warning('Your toast is working!');
4️⃣ Publish config (optional)
This creates config/alert.php where you can customize alert colors, timeout, and other settings.
php artisan vendor:publish --tag=alert-config
return [ 'colors' => [ 'success' => '#28a745', 'danger' => '#dc3545', 'info' => '#17a2b8', 'warning' => '#ffc107', ], 'timeout' => 3000 // milliseconds ]; Change these values in config/alert.php to match your site theme.
Made with ❤️ by Saicoder 🚀✨
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-06-23