Download the PHP package pentiminax/ux-sweet-alert without Composer
On this page you can find all versions of the php package pentiminax/ux-sweet-alert. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pentiminax/ux-sweet-alert
More information about pentiminax/ux-sweet-alert
Files in pentiminax/ux-sweet-alert
Package ux-sweet-alert
Short Description SweetAlert2 integration for Symfony
License MIT
Homepage https://github.com/pentiminax/ux-sweet-alert
Informations about the package ux-sweet-alert
UX SweetAlert
UX SweetAlert is a Symfony bundle that integrates the SweetAlert2 library into your Symfony applications. It provides PHP helpers and a Stimulus controller to easily display alerts and toast notifications.
Requirements
- PHP 8.2 or higher
- Symfony StimulusBundle
- Composer
Installation
Install the library via Composer:
Basic usage
To automatically display toasts and alerts in your templates, add the following Twig function in your base.html.twig (or the layout file):
Alerts
Inject the AlertManagerInterface and use the helper methods to create alerts:
Toasts
Inject the ToastManagerInterface
service and
create toasts:
Advanced documentation
All versions of ux-sweet-alert with dependencies
symfony/config Version ^7.0
symfony/dependency-injection Version ^7.0
symfony/http-kernel Version ^7.0
symfony/stimulus-bundle Version ^2.22
symfony/ux-live-component Version ^2.26
symfony/ux-twig-component Version ^2.26
twig/twig Version ^3.8