saicoder/alert

Reusable Laravel toast package

v1.0.0 2025-06-20 12:50 UTC

This package is auto-updated.

Last update: 2025-06-23 04:20:00 UTC


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 🚀✨