Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Filament Undo Toast

Filament Undo Toast Laravel Package

hoceineel/filament-undo-toast

A Laravel Filament package that adds undoable toast notifications, letting users instantly reverse destructive actions like deletes. Customize messages, durations, and actions to make admin workflows safer and more forgiving.

View on GitHub
Deep Wiki
Context7

Undo toasts for Filament: every delete, restore, edit and detach gets an undo button with a countdown and Cmd/Ctrl+Z.

Frequently asked questions about Filament Undo Toast
How do I install filament-undo-toast in a Laravel app?
Install it with Composer using composer require hoceineel/filament-undo-toast, then register the plugin in your Filament panel provider. The package ships its config, views and translations through the standard Laravel package service-provider pattern, so you can publish those assets if you want to customize them. Undo behavior is opt-in per action, so nothing changes in your panel until you enable it on specific actions. No queue, external service or schema change is required for the base feature.
Which Laravel, PHP and Filament versions does filament-undo-toast support?
The package is built as a Filament panel plugin on top of Laravel's standard package conventions, so Filament is a hard dependency rather than an optional one. Because it is still pre-1.0, the exact Laravel, PHP and Filament constraints live in the composer.json on Packagist and can shift between minor releases. Check that file against your app's locked versions before upgrading, and pin a version you have tested. Filament v3 versus v4 compatibility in particular should be confirmed there rather than assumed.
Does filament-undo-toast require database migrations or a queue?
The base feature requires no migrations from you, no queue worker and no external service, so adoption is a Composer require plus one plugin registration. However, undo means the deleted record has to be persisted somewhere in order to be replayed, so the package does retain the data you deleted during the undo window. Review the config for where that payload lives and how long it is kept before rolling this out to production, especially if you handle personal data.
How do I make a delete or detach action undoable?
Undo is opt-in per action, so you enable it on the specific Filament actions where reversal makes sense rather than globally across the panel. The package extends Filament's existing action and notification surface instead of replacing it, which keeps the integration low-ceremony. v0.2.0 added chainable options such as restoreRelations([...]) and replaceSuccessNotification(), with both per-action and global opt-outs. Check the README for the current method names, since the API surface is still moving in the 0.x line.
Can the undo restore related records like pivot rows and HasMany children?
Yes, v0.2.0 extends undo from a single row to a related object graph. You can implement the HasUndoableRelations contract on a model or call restoreRelations([...]) on the action, covering BelongsToMany with pivot columns, HasMany, HasOne, MorphMany and MorphOne. Only missing rows are inserted, inside the same transaction as the restore. That means a partial graph can be restored if some children already exist, so treat it as best-effort recovery rather than a guaranteed snapshot.
Is it safe to undo hard deletes in production?
Undo here is a data-integrity feature, not just a UI nicety, so plan accordingly. Watch for unique-constraint collisions if a replacement row was created during the undo window, foreign key ordering, cascade behavior, and side effects that already fired and cannot be rolled back such as emails, files, search indexes, webhooks and audit trails. The delete and the undo happen in separate transactions, so longer undo windows widen the drift window. If you need guaranteed recoverability, Laravel soft deletes remain the safer default and this package is the convenience layer for the harder cases.
Can user B undo user A's deletion in a shared Filament panel?
Undo authorization being independent of delete authorization is an open question for this package, and multi-tenant scoping of the retained payload is not something the documentation currently guarantees. Do not assume the undo button inherits the same policy checks as the original delete. Gate the undo action with your own policies and verify tenant isolation by testing a second user against a record they could not have deleted. Review this before enabling undo in any shared or multi-tenant admin panel.
How do I customize the toast message, duration and language?
Messages, durations and the available undo actions are driven by the package config, which you publish into your app and edit. Translations ship for 23 locales and reuse Filament's own terminology, including correct Russian, Ukrainian, Polish and Czech plural forms, so you can skip most of a translation project. Your own overrides go in the standard Laravel lang files. The countdown and the Cmd/Ctrl+Z shortcut are part of the Alpine/JS toast stack layered on Filament's notification system.
Does it replace Filament's success notification after a delete?
As of v0.2.0 the package replaces Filament's own success notification for the same action by default, which visibly changes every delete flow when you upgrade. You can opt out per action or globally via config. Because this works by overriding Filament notification internals, a Filament minor release can break the override or cause double notifications, so re-test your delete flows after any Filament upgrade. That coupling is the main thing to keep an eye on.
How is filament-undo-toast tested, and is it production ready?
The project ships a Playwright end-to-end suite plus a Testbench workbench app, which covers the parts most likely to regress silently: toast stacking, the keyboard shortcut, focus handling, the undo spinner and failure states. It also has SECURITY.md, Dependabot with a cooldown and SHA-pinned GitHub Actions. The caveats are that it is pre-1.0 with a fast-moving API, so minor bumps can carry behavioral change, and it is a single-maintainer package, which is a real bus-factor risk for anything in your delete path. Pin versions and test upgrades.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums