devrabiul/laravel-toaster-magic
Dependency-free toast notifications for Laravel with Livewire v3/v4 support. Drop-in, customizable toasts with multiple modern themes, RTL + dark mode, XSS-safe links, and no need for jQuery, Bootstrap, or Tailwind.
A "Trust & Polish" release: no change to the package's scope, focused on correctness, reliability, compatibility, and developer experience. All changes are backward compatible.
dispatch() entry point. ToastMagic::dispatch()->success(...) now works as
documented (previously the README example referenced a method that did not exist).timeOut and showDuration can now be set per toast via
the options array (and via Livewire event options), falling back to the global config when omitted.'pauseOnHover' => false in the config.toastMagic.clear() / toastMagic.dismissAll() dismiss all
visible toasts from JavaScript.MessageBag support. Passing a MessageBag (e.g. $validator->errors()) to any
toast type now flattens it into a single toast, one message per line.dispatch(), clear(), MessageBag flattening, scripts()
output, newline normalization, per-toast options, and normalizeVersion().composer.json: php: ^8.0 and
illuminate/support: ^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0. Composer can now warn
about installation on an unsupported stack.styles, scripts, scriptsPath,
dispatch, useVite, accurate MessageBag parameter types) for reliable IDE autocompletion.MessageBag handling across the four toast methods into a single
normalizeMessage() helper.preventDuplicates now works. The option shipped in the config but was never honored by the
JavaScript runtime; identical toasts (same type, heading, and description) that are currently
visible are now skipped when the option is enabled.clear() now clears queued messages. It previously only reset the in-memory list, leaving
already-flashed messages in the session; it now also forgets the session key.MessageBag no longer triggers a TypeError. The previous string type hint made the
MessageBag handling unreachable.e()). Escaping message content by
default is planned for a future major release (v3.0.0), with an opt-in flag for intentional HTML.How can I help you explore Laravel packages today?