An audit trail answers who did what, to which record, and when. Business platforms with staff, payouts or customer data need one early, because adding it after an incident is too late.
What the public data shows (30 November 2026)
We read package metadata on Packagist and GitHub. We did not benchmark either package for this article.
- spatie/laravel-activitylog: about 75 million installs, about 5.9 million a month, version 5.1.5 released 13 November 2026. It requires PHP 8.4 and Laravel 12 or 13.
- owen-it/laravel-auditing: about 46 million installs, about 2.4 million a month, version 14.0.7 released 28 October 2026. It requires PHP 8.2 and Laravel 11, 12 or 13.
Both are widely used and recently released. Note the PHP floor: the activitylog release above needs PHP 8.4, so check your server before you plan an upgrade.
How they differ
- activitylog is a general activity log: you record events, with a causer and a subject, and can add your own properties. Good for feeds and business events such as payout approved.
- laravel-auditing focuses on model changes: it stores old and new values for audited models. Good for a field-level history of records.
When to build your own
- You need an append-only log with no update or delete path, and proof that rows were not edited.
- Retention and access rules are strict, for example restricted readers and a fixed keep period.
- Important events are not model changes, such as a failed sign-in, an export or a webhook rejected.
- You want the log in a separate database or store.
A custom table is small: who, role, action, subject type and ID, before and after for key fields, IP address, outcome and timestamp. The hard part is discipline, not code.
Rules that apply to any choice
- Never log passwords, tokens or full card numbers.
- Make the log append-only in the application and restrict who can read it.
- Log the failure as well as the success.
- Test that a real action writes exactly one entry.
Our checklist for two-step login and audit logs goes deeper on what to record and what to leave out.
