Releases: jantinnerezo/livewire-alert
v4.0.5
- Added
html
function
LivewireAlert::title('New html function!')
->html("<p><strong>You should try it out!</strong></p>")
->show();
Full Changelog: v4.0.4...4.0.5
v4.0.4
What's Changed
- Feat: add comments to the alert facade to phpstan and editors understand by @juanjoballesteros in #167
New Contributors
- @juanjoballesteros made their first contribution in #167
Full Changelog: v4.0.3...v4.0.4
v4.0.3
What's Changed
- Fixed: onDeny method triggers onConfirm automatically by @jantinnerezo in #164
Full Changelog: v4.0.2...v4.0.3
v4.0.2
- Fixed eval option typo
Full Changelog: v4.0.1...v4.0.2
v4.0.1
Evaluate SweeAlert2 callback options.
Full Changelog: v4.0.0...v4.0.1
v4.0.0
v4.0.0 Release
Overview
After the successful support for Livewire 3 in v3.0.3, I am excited to unveil Livewire Alert v4.0.0—a major refactor of the package! This release introduces a modern, fluent API, enhanced flexibility, and broader Laravel compatibility (10.x to 12.x). Designed to seamlessly integrate with Livewire 3 and SweetAlert2, v4.0.0 brings a fresh approach to user-friendly alerts in your Laravel Livewire projects.
What's added?
- Fluent Facade Interface: Replaced the v3 trait-based $this->alert() with a chainable LivewireAlert Facade (e.g., LivewireAlert::title('Success')->success()->show()).
- Dependency Injection: Inject
LivewireAlert
into Livewire methods for contextual alert handling (e.g., public functionsave(LivewireAlert $alert)
). - Button customization methods:
withConfirmButton()
,withCancelButton()
,withDenyButton()
with optional text and event handling viaonConfirm()
,onDeny()
,onDismiss()
and more. - Confirmation Dialog Shortcut: Added
asConfirm()
to quickly set up a question-style alert with confirm and deny buttons. - Position method: Introduced
position()
with support for Position enum or string values (e.g., top-end, center).
This is just a highlight of the new features! Check out the README.md.
Whats's Changed?
- Major refactoring: Refactored the codebase, moving away from the v3
LivewireAlert
trait to a more modular, Facade-driven architecture. - Laravel Compatibility: Extended support to Laravel 10.x, 11.x, and 12.x, dropping older versions for modern PHP (8.1+).
- Event Handling: Replaced v3’s onConfirmed, onDismissed, onDenied emit syntax with Fluent onConfirm(), onDeny(), and onDismiss() methods, passing data directly to component methods.
- Configuration: Simplified setup with a single livewire-alert.php config file.
What’s Removed?
- Required JavaScript Assets: Eliminated the need for bundled or package-specific JavaScript files from v3. Now, you only need to include SweetAlert2 (e.g., via CDN: <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>), or your preferred package manager, making the package lighter and more flexible.
Full Changelog: v3.0.3...v4.0.0
v3.0.3
What's Changed
- Laravel 12.x Compatibility by @laravel-shift in #159
New Contributors
- @mundiakaluson made their first contribution in #149
Full Changelog: v3.0.2...v3.0.3
v3.0.2
What's Changed
- Defer loading scripts by @jigar-dhulla in #137
- Laravel 11.x Compatibility by @laravel-shift in #147
New Contributors
- @jigar-dhulla made their first contribution in #137
- @laravel-shift made their first contribution in #147
Full Changelog: v3.0.1...v3.0.2
v3.0.1 Release
Release Update: Livewire Alert Package v3.0.1
I recently released the Livewire Alert v3.0 to support the v3.0 version of Livewire. Upon review, many of you discovered an oversight in the release: the package dependencies were not correctly updated to reflect the compatibility with Livewire 3.0.
I apologize for any inconvenience this may have caused. To address this:
I've updated the dependencies to ensure compatibility with Livewire 3.0.
A new release with the corrected dependencies has been published. I recommend updating to this latest version to avoid any potential issues.
v3.0 Release
Official Support for Livewire 3 stable release
I'm excited to announce that this release introduces support for Livewire 3 stable release!
Installation
composer update jantinnerezo/livewire-alert
What's Changed
New Contributors
Full Changelog: https://github.com/jantinnerezo/livewire-alert/compare/2.2.7...v3.0@beta