jeremykenedy/laravel-toast
Powerful, highly configurable toast notifications for Laravel with 56 animations, 19 per-toast props, RTL support, dark mode, and full CSS/frontend framework parity across Tailwind, Bootstrap, Livewire, Vue, React, and Svelte.
Pros:
colors_css on the payload, injected via a single <style id="toast-colors"> tag) rather than baked into components.TOAST_SETTINGS_ENABLED=true. This preserves the existing "drop-in UI layer" posture and keeps the blast radius of the upgrade at zero for teams that don't want the settings feature.config/toast.php and .env, with per-value fallback to config. This is a predictable, inspectable resolution order rather than magic.Cons:
toast_settings table), routing, authorization integration, and an admin UI. That is a materially larger architectural commitment than the v3.0.x footprint and pulls the package into the "configuration management" domain..env/config and a database row. Any team that treats config as code (GitOps, environment parity, change review) has to decide how the DB layer fits, because saved settings are not version-controlled and are invisible to code review.<style> tag, which will collide with a strict Content-Security-Policy (style-src) unless a nonce or hash strategy is adopted.Toast::success(), notifications, events). Requirements are now explicit: PHP 8.2+, Laravel 10–13, Livewire 3 or 4 when used.toast-views must merge the new data-toast-type and data-toast-part attributes into their copies, or configured colors silently will not reach the markup. This is a correctness issue that fails quietly, not loudly.HasInstallPrompts::$font is now the FONT constant. Only affects code that read or overrode that protected property.npm run build if imported from vendor/; copied components must import and call applyToastColors(toast.colors_css). Blade/Livewire users get the settings views prebuilt for all three CSS frameworks.--settings-page without --settings-layout → production page loads Tailwind/Bootstrap from a public CDN (a runtime dependency on a third party and a supply-chain/CSP concern)..env. Without added governance (audit log, export/import, migration-seeded defaults), this is a new class of production-only surprise.<style id="toast-colors"> requires CSP allowance. Teams with strict policies need a nonce/hash plan before enabling.@source line. If the host's Tailwind config missed it, previews render unstyled — a support ticket, not a bug.manage-toast-settings mapped to an existing permission (e.g., manage-site), and is that permission itself reviewed? An undefined gate denies everyone, which is safe but will look like an outage if nobody defines it.data-toast-type/data-toast-part, and how do we verify colors actually land?<style id="toast-colors"> pass style-src, or do we need a nonce?<livewire:toast-settings /> is the lowest-effort, highest-fidelity path; prebuilt Tailwind v4 / Bootstrap 5 / Bootstrap 4 views.@toastSettings or @include('toast::settings') inside your own layout — avoids the CDN fallback entirely.toast-views was ever published — this decides whether the upgrade is composer update or composer update plus a view merge.composer update jeremykenedy/laravel-toast → php artisan view:clear → merge view attributes if published → npm run build if importing JS containers from vendor/.php artisan toast:update --settings --settings-page --settings-layout=layouts.app --settings-middleware=web,auth --settings-gate=manage-toast-settings → review the published migration → php artisan migrate.applyToastColors + toast.colors_css.<style id="toast-colors">.@source line → unstyled previews only.GET /toast/settings in apps with a catch-all route — review route order after registration.composer update + view:clear + asset rebuild; regression-check existing toasts.$casts compatibility fix signal active, disciplined maintenance.TOAST_SETTINGS_ENABLED to revert to config (row preserved), or roll back the migration to drop the table; composer can pin v3.0.1.docs/settings.md, README and CHANGELOG updates, screenshots for all three CSS frameworks, and a documented upgrade/rollback path. Troubleshooting for cross-framework edge cases is still thin.data-toast-part / data-toast-type, or host Tailwind missing the @source line.toast_settings row differs; disable the flag or align the rows.<style> tags are per-page, not per-toast-volume — no scaling concern, but do verify they aren't duplicated under heavy stacking.| Failure Scenario | Impact | Mitigation |
|---|---|---|
Published views not updated with data-toast-part |
Configured colors silently ignored | Diff published views against v3.1.0 before enabling colors |
| Gate never defined | Settings page denies all users (looks like an outage) | Define and code-review the gate before enabling the page |
--settings-page without --settings-layout |
Production page loads Tailwind/Bootstrap from a public CDN | Always pass --settings-layout; lint for CDN references in prod builds |
Strict CSP blocks <style id="toast-colors"> |
Colors don't apply; possible console noise | Nonce/hash strategy or precomputed stylesheet |
| Saved settings diverge across environments | Prod/staging render differently from identical code | Export/import rows, seed defaults, or restrict DB overrides to non-prod |
| Migration run without review | Unintended schema change in prod | Review the published migration; roll back via explicit --path |
| Malformed color submitted | Rejected with 422 | Expected; no action — confirm operators understand error surface |
Host Tailwind missing @source |
Preview panel unstyled; live preview misleading | Verify build config; test in a real browser, not just CI |
| Upstream stall / single maintainer | No fixes for future Laravel changes | MIT fork; keep the toast layer thin so replacement is cheap |
| Reset pressed by mistake | Instant loss of custom palette, no confirmation | Tell operators; export settings before large changes |
.env).applyToastColors for copied components; npm run build for vendor imports.How can I help you explore Laravel packages today?