saicoder / alert
Reusable Laravel toast package
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Language:Blade
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 🚀✨