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

Tardis Laravel Package

yellow-three/tardis

Tardis is a Laravel package for time-travel debugging and auditing Eloquent models. It records model changes so you can inspect historical records, query data as it existed at a given time, and restore previous states through a simple API—without manual snapshots or extra tracking code.

View on GitHub
Deep Wiki
Context7

At a glance

Frequently asked questions about Tardis
What is yellow-three/tardis used for in Laravel?
Tardis is a Laravel package for time-travel debugging and auditing Eloquent models. It records model changes automatically so you can browse historical records, query your data as it looked at a given moment, and restore a previous state through a simple API. It targets debugging production data issues and building an audit trail without writing your own snapshot logic.
How do I install yellow-three/tardis if it is not on Packagist?
Add the GitHub repository as a Composer VCS repository, require yellow-three/tardis at a pinned tag or commit, then run the package installer. The installer performs privileged bootstrap work and prints a generated password to the console, so capture it, rotate it immediately, and keep it out of CI logs. For repeatable builds, mirror or fork the repository so CI and production never depend on a moving upstream ref.
Which Laravel and PHP versions does Tardis support?
Tardis targets Laravel 13 with PHP 8.3 as the floor, so it is a poor fit for applications still on Laravel 10 or 11 unless you are prepared to move the whole stack forward. Check that your hosting image, static analysis tooling and other Composer dependencies support the same versions before adopting. Bleeding-edge requirements narrow the supported matrix and raise the odds of upstream ecosystem gaps.
Do I need to add observers or tracking code to my models?
No. Tardis hooks into Eloquent events so changes are recorded without observers, manual snapshots or extra tracking code in your domain models. You point it at the models you want tracked through configuration and it handles the rest, which keeps your application code clean. Check the tracked-model list carefully, because everything you register produces writes on every change.
Can I query records as they existed at a specific time?
Yes. Tardis supports as-of queries, so you can ask for a record's state at a given timestamp or revision instead of replaying your own change log. That is what makes it useful for questions like what did this row look like when the bug happened. Historical reads come from stored change data, so indexes and retention policy matter once the history table grows.
How do I restore a model to a previous state?
Tardis exposes a restore API that writes a previously recorded state back onto the model. Treat a restore as a real data mutation: wrap it in a transaction, take a backup, and decide which related records should follow. For anything user-facing, put restores behind authorization and log the restore itself.
Is Tardis production-ready, or should I wait for 1.0?
Tardis is pre-1.0 with an explicit warning that the API can still change, so treat schemas, plugin contracts and settings surfaces as unstable. Before exposing it, review the security-sensitive defaults, including privileged bootstrap behaviour, any command runner or log viewer, and upload or media handling. Pin tagged releases, watch the changelog and upgrade notes, and avoid tracking the main branch in production.
Will Tardis slow down my application or bloat the database?
Every tracked change is an extra write, so history tables grow with write volume and will outgrow the source tables on busy models. Track only the models you actually need history for, add indexes for the columns you filter on, and schedule pruning or archival of old data. Run tardis:doctor as a health check and load-test the admin screens against realistic history volume.
How do I test and deploy an application that uses Tardis?
In tests, use RefreshDatabase and freeze time with something like Carbon::setTestNow so recorded changes and as-of queries stay deterministic. In CI and deploys, run tardis:doctor as a pre-flight check and re-run php artisan route:cache whenever resource definitions change, because a stale route cache silently produces 404s. Treat definition changes as a deploy-time step rather than a runtime admin action.
How does Tardis compare to laravel-auditing or spatie/laravel-activitylog?
owen-it/laravel-auditing and spatie/laravel-activitylog both record model changes and are older, more widely deployed options, but they focus on audit logs and activity feeds rather than as-of queries and state restoration. Tardis combines auditing, historical querying and restore in one package, at the cost of pre-1.0 API churn and a narrower version floor. If you only need an immutable audit trail, the established packages carry less risk; if you need to reconstruct and restore past states, Tardis covers more ground.
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.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager