Download the PHP package sudam-shrestha/sudam-sweet-alert without Composer
On this page you can find all versions of the php package sudam-shrestha/sudam-sweet-alert. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sudam-shrestha/sudam-sweet-alert
More information about sudam-shrestha/sudam-sweet-alert
Files in sudam-shrestha/sudam-sweet-alert
Package sudam-sweet-alert
Short Description This is my package sudam-sweet-alert
License MIT
Homepage https://github.com/sudam-shrestha/sudam-sweet-alert
Informations about the package sudam-sweet-alert
Sudam Sweet Alert
A modern, actively maintained SweetAlert2 wrapper for Laravel 12. Fire beautiful modal alerts and toasts straight from your controllers using session flash data — no manual JS wiring required.
Built as a fresh alternative to older SweetAlert packages that are no longer maintained.
Features
- Simple, chainable API:
success(),error(),warning(),info(),question(),toast() - Built-in toast notifications with sensible defaults (top-right, auto-dismiss)
- Configurable close button, colors, background, and animation on every alert
- Per-call option overrides — any SweetAlert2 option can be passed through
- Zero database/migrations required — pure session flash, works out of the box
Installation
You can install the package via composer:
Publish the config file with:
This is the contents of the published config file:
Optionally, publish the views to customize the alert markup:
Finally, add this once to your main layout, right before </body>:
Usage
Import the facade:
Modal alerts
Toast notifications
By default, toasts appear top-right and auto-dismiss after 3 seconds.
Overriding options per call
Any SweetAlert2 option can be passed as the last argument:
Chainable helpers
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Sudam Shrestha
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of sudam-sweet-alert with dependencies
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0||^11.0||^12.0