jarek-paprocki/laravel-audit
Laravel Audit provides automatic model auditing for Laravel apps, tracking create, update, and delete events so you can see who changed what and when. It stores revisions and lets you review or revert changes.
Architecture fit
owen-it/laravel-auditing is a model-layer instrumentation package: an Auditable trait attaches an observer to Eloquent models and writes a normalized record (event, old values, new values, actor, URL, IP, user agent, timestamps) to a configurable audit driver — database, Redis, file, or a custom driver. It is a single-purpose, low-coupling dependency: it does not own domain state, does not require a service provider of your own beyond registration, and does not impose a schema beyond its own audits table. For a Laravel monolith or modular monolith this is a clean fit for the "who changed what, when, and from where" requirement that otherwise gets hand-rolled badly.
The important architectural caveat is that the package observes Eloquent events only. Query-builder mass updates/deletes, raw SQL, DB::table() writes, and truncate operations bypass it entirely. An audit capability built on this package is therefore a model-write audit trail, not a database audit trail. That distinction must be stated explicitly to compliance stakeholders, because for many regulated use cases (SOX-style financial data, PHI) it is disqualifying without supplementary controls.
Integration feasibility
Low integration cost. Install, publish config and migrations, add the trait to in-scope models, configure $auditInclude/$auditExclude and $auditEvents, register a user resolver for non-standard auth (multi-guard, API tokens, service principals, impersonation). Custom audits via Auditable transformation hooks allow redaction and attribute normalization. No front-end, no API surface, no runtime service dependency or network hop.
Technical risk
jarek-paprocki/laravel-audit) does not match the repository (owen-it/laravel-auditing). This is either a fork, a republish, or a metadata error. Provenance, upstream divergence, and maintenance commitment must be resolved before any code depends on it. If it is a fork, we inherit the maintenance burden for security patches.Dependents: 0 contradicts a 3.4k-star, widely used package and is almost certainly a crawler artifact; the Last release: 2026-06-20 date must be validated against the real tag history.Key questions
composer.json, and who owns it upstream?Stack fit
Native Laravel. Requires a Laravel/PHP version matrix match — verify the constraint against our current framework version before sequencing, since this package's major versions track Laravel majors. Driver choice should default to database for consistency with business transactions; redis/file only for high-volume, non-critical logging. Compatible with morphMap if we alias model names, and with soft deletes (deleted/restored events).
Migration path
Greenfield-friendly and brownfield-tolerant: adding the trait to an existing model is non-breaking, and the audits table is additive. No backfill of historical changes is possible — the trail starts at deployment. If historical reconstruction is a requirement, that is a separate data-archaeology workstream and should be scoped out explicitly rather than assumed.
Compatibility
Watch three seams: (a) existing model observers/listeners that mutate attributes on save, which change what the audit diff records; (b) teams using DB::table() or repository patterns that already bypass Eloquent — those models will appear to have no changes; (c) existing global scopes and multi-tenancy, where the tenant identifier must be captured in the audit row or cross-tenant leakage becomes possible in shared audit tables.
Sequencing
Maintenance
Small, well-bounded surface: config, migration, and trait adoption. Ongoing cost is dominated by the audits table, not the code. Budget for schema lifecycle work — partitioning by month or an archival job — from day one; an append-only table on a transactional database is a growth problem, not a code problem.
Support
MIT license, no vendor SLA. Bus factor rests on upstream maintainers; pin versions, vendor the fork if the identity mismatch resolves to a fork, and keep an internal owner. Include the audit schema in backup/restore drills — restoring business tables without the audit table silently breaks the trail's continuity.
Scaling
Two failure modes: write amplification (every model save becomes an extra insert, inside the calling transaction by default) and read contention (reporting queries over a growing table). Mitigations: configure the package's queue support so audit writes are dispatched rather than inline — accepting the trade-off that queued audits can be lost on queue failure and may lag behind the business write. For high-write models, benchmark before rollout; a 2x write cost on a hot table is a real capacity-planning input. Also confirm the audit insert is not silently participating in and inflating rollback of business transactions.
Failure modes
Ramp-up
Half a day for a competent Laravel engineer to adopt the trait and configure drivers; one to two days to do redaction, actor resolution, and coverage testing properly. Non-trivial onboarding burden sits with compliance/legal, not engineering: retention, erasure, and whether a mutable Eloquent-level log satisfies the stated control objective. Recommend a written scope statement — "model-write audit trail for forensic and internal accountability purposes; not a compliance-grade system of record" — signed before the fleet rollout, so the capability is not later oversold.
How can I help you explore Laravel packages today?