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 Draft Recovery

Filament Draft Recovery Laravel Package

oddvalue/filament-draft-recovery

Auto-save and crash recovery for Filament v4/v5 create and edit pages. Form state is saved as a debounced draft (2s by default), so users can recover unsaved work after a browser crash, tab close, or lost connection. Swappable storage drivers included.

View on GitHub
Deep Wiki
Context7

Auto-save draft & crash recovery for Filament create/edit pages, with swappable storage drivers (browser localStorage, database, or oddvalue/laravel-drafts)

Frequently asked questions about Filament Draft Recovery
How do I install oddvalue/filament-draft-recovery in a Laravel Filament application?
Install it with Composer using composer require oddvalue/filament-draft-recovery, then register the plugin on your Filament PanelProvider. Laravel package auto-discovery handles the service provider, so there is no manual provider registration. If you choose the database driver you also publish and run the package migration and review the published config file. No changes to your existing resource or page classes are required.
Which Filament and PHP versions does filament-draft-recovery support?
The package targets Filament v4 and v5 create and edit pages and assumes a standard Livewire-based panel stack. Exact PHP and filament/filament constraints are declared in the package composer.json and shown by the badges in the README, so check those before upgrading. There is no separate compatibility matrix, so verify your Filament major against the constraint rather than assuming forward compatibility with future releases.
Which draft storage drivers does Filament Draft Recovery support?
It ships with three swappable drivers: browser localStorage, a database table, and the author's oddvalue/laravel-drafts package. The driver is selected through configuration, so the same page code works regardless of where drafts are persisted. That lets you start with a zero-footprint front-end-only setup and later move to durable, cross-device storage without touching your resources. Swapping drivers is a config change plus, for the database option, running the migration.
Do I need the database driver, or is localStorage enough for draft recovery?
localStorage is enough if you only want to protect against a crashed tab or accidental close on the same browser and device. It adds no server-side footprint, no migration, and no schema or data-retention review, which makes it the lowest-risk starting point. Choose the database or laravel-drafts driver when users need drafts to survive across devices, browsers, or cleared local storage, and budget for the retention and privacy work that persistent server-side drafts require.
How does draft recovery work after a browser crash or closed tab?
While a user edits a create or edit form, the package auto-saves the form state on a debounced interval, two seconds by default. When the user returns to the same page, the stored draft is detected and they are offered the chance to restore their unsaved work. Recovery is aimed at accidental loss, not at replacing your normal save flow, and it complements rather than replaces Filament's built-in unsaved-changes guard. Treat any recovery prompt as a UX policy decision: decide what it is allowed to overwrite.
How do I configure the autosave debounce and choose which resources auto-save?
Autosave timing and driver selection are config-driven, so you can tune the debounce interval and storage backend without editing page classes. Enable the plugin selectively rather than panel-wide on day one, rolling it out resource by resource after validating a representative complex form. This matters because autosave fires on Livewire form updates, and very large forms or rapid typing can make an aggressive interval costly. Decide per panel or per environment which resources are covered.
Are file uploads, repeaters, and builder fields included in saved drafts?
Serializable field state is what gets persisted, so simple text, select, and similar inputs recover reliably. File uploads and other non-serializable field state are typically out of scope, which means recovery will be partial on media-heavy forms and users may need to re-attach files. Test your most complex resources, especially repeaters, rich text, and builder fields, before assuming full fidelity. Document the gaps for editors so a partial recovery does not look like data loss.
Are stored drafts secure and do they comply with our data retention policy?
Drafts can contain the same personal or sensitive data as the underlying record, so treat them as a new data store. With localStorage the payload sits unencrypted in the user's browser, and with the database driver it becomes a new table outside your existing retention rules. Check whether the database driver encrypts payloads at rest and whether draft rows are scoped by tenant or authorization before enabling it on sensitive resources. If those guarantees are missing, add them or restrict the feature to low-risk resources.
How do I clean up old drafts so the table does not grow forever?
The database driver writes drafts to a table, so you need a TTL and a pruning mechanism rather than letting rows accumulate. Check the published config for a retention setting and confirm whether the package provides a scheduled cleanup command; if it does not, add your own scheduled job that deletes stale drafts. Also clear drafts after a successful submit so an old draft cannot be restored over newer server data. Review the table size periodically if you have high edit volume.
Is oddvalue/filament-draft-recovery actively maintained and safe to put in production?
The package is well tested with coverage enforced in CI, but it is a single-maintainer project with a small dependent base, so bus factor is the real risk rather than the technology. Verify the actual release history and open issues yourself, since reported release dates for this package should be treated as unconfirmed. Because it sits in the write path of every create and edit form, pilot it behind a config flag on one non-critical panel first. Have a fallback plan, such as disabling the plugin or switching to the localStorage-only driver, if maintenance stalls.
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.
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
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