Sudam Sweet Alert flashes beautiful modal alerts and toast notifications straight from your controllers. One line of PHP. Zero manual JS wiring. Built and maintained for Laravel 11 & 12.
Try it live — this is the real output
Built for Laravel 12 and PHP 8.2+, unlike older SweetAlert wrappers that have gone stale. Updated as Laravel evolves.
Everything runs through Laravel's session flash. Call a PHP method, redirect, done. One Blade include and you're finished.
Every SweetAlert2 option is available. Override colors, close buttons, positions and timers globally or per call.
Four steps. Should take under two minutes on a fresh Laravel 12 app.
Add this once, right before </body>:
Click "Try it" on any card below — these fire the actual package output, not a screenshot.
Confirms an action completed. The most common alert — form saves, updates, deletions.
Something failed. Validation errors, failed transactions, blocked actions.
Flags risk before it happens. Irreversible actions, expiring sessions.
Neutral, useful context. Announcements, tips, non-urgent updates.
Asks before acting. Pair with a confirm/cancel flow for destructive actions.
Non-blocking corner notification. Top-right by default, auto-dismisses in 3s.
Every method returns $this, so you can chain adjustments inline.
Set once in config/sudam-sweet-alert.php, override per call whenever you need
to.
| Key | Default | Controls |
|---|---|---|
| position | 'center' | Default position for modal alerts |
| timer | null | Auto-close delay (ms) for modals |
| show_confirm_button | true | Show OK button on modals |
| toast_position | 'top-end' | Default toast corner |
| toast_timer | 3000 | Toast auto-dismiss delay (ms) |
| show_close_button | true | Show × button on all alerts |
| confirm_button_color | '#3085d6' | OK button color |
| cancel_button_color | '#d33' | Cancel button color |
| background | null | Popup background color |
| cdn | jsdelivr v11 | SweetAlert2 script source |
It's a Laravel package that wraps SweetAlert2, letting you fire modal alerts and toast notifications directly from controllers using session flash data — no JavaScript wiring needed.
Yes — built and tested against Laravel 11 and 12, on PHP 8.2 and above.
Yes, fully open source under the MIT license — free for personal and commercial projects.
Same core idea, actively maintained for current Laravel versions, with built-in toast support, close-button and color theming out of the box.
One Composer command. Two minutes. No more dead SweetAlert wrappers.
View on Packagist →