Description
Lightweight, themeable toast package for Laravel & Livewire with no jQuery, Bootstrap, or Tailwind dependency.
1. Controller Usage
Trigger toast notifications from your controllers using the ToastMagic facade:
use Devrabiul\ToastMagic\Facades\ToastMagic; public function store(){ // Simple message ToastMagic::success('Successfully Created'); // Message with description ToastMagic::success('Success!', 'Your data has been saved!'); // With custom options ToastMagic::success('Success!', 'Your data has been saved!', [ 'showCloseBtn' => true, 'customBtnText' => 'View Record', 'customBtnLink' => 'https://example.com', ]); return back();}
Available toast types: success, info, warning, error
2. JavaScript Usage
Use ToastMagic directly in JavaScript for AJAX responses or client-side events:
const toastMagic = new ToastMagic(); toastMagic.success('Success!', 'Your data has been saved!');toastMagic.error('Error!', 'Something went wrong.');toastMagic.warning('Warning!', 'Check your input.', true);toastMagic.info('Info!', 'Click for details.', false, 'Learn More', 'https://example.com');
Signature: toastMagic.{type}(heading, description, showCloseBtn, customBtnText, customBtnLink)
Recent Courses on Laravel Daily
AI Agents/IDEs for Laravel: May 2026 (Claude Code, Codex, OpenCode, etc)
7 lessons
52 min
Laravel 13 Eloquent: Expert Level
41 lessons
1 h 34 min
How to Structure Laravel 13 Projects
16 lessons
1 h 32 min read