backpack/activity-log
Backpack Activity Log adds an audit trail to your Laravel admin panel: automatically records user actions and model changes, then lets admins browse, filter, and inspect activity from a dedicated Backpack CRUD screen. Built on spatie/laravel-activitylog for simple setup.
Architecture fit. backpack/activity-log is not an audit-logging engine; it is a presentation and convenience layer over spatie/laravel-activitylog bundled for the Backpack admin panel. It contributes a CRUD controller, filters, list/show views, a menu entry, and opinionated defaults on top of Spatie's model-traits-and-events core. Architecturally that makes it a leaf dependency in the admin tier — it should never sit on a hot request path except as the trait that writes activity rows. The decision is therefore less "should we log activity" (that is Spatie's package) and more "should our admin UI for activity be Backpack's prebuilt one."
Integration feasibility. High if and only if the application already runs Backpack CRUD. In that case install is a Composer require, publish/run the Spatie migration, add the trait to a handful of models, and register the menu item — realistically a day of work including authorization wiring. Outside Backpack, feasibility collapses: you would be pulling a full admin-panel framework in to render one read-only table, which is not defensible. The package also inherits Spatie's version coupling, so feasibility is contingent on resolving a compatible spatie/laravel-activitylog major (v4 vs. v5 changed columns and properties handling) against the Laravel version in use.
Technical risk.
old/new attribute payloads verbatim; PII, tokens, and secrets will land in the table unless logOnly/logExcept are configured per model.activity_log table degrades the very UI this package provides.Key questions. Are we already standardized on Backpack, and which major? Is the requirement operational observability or evidentiary audit? What is our expected activity write volume per day, and who owns retention? Do we need causer attribution for API/queue contexts where Auth::user() is absent? Which attributes must never be persisted?
Stack fit. Adopt only on a Laravel + Backpack stack where Spatie's package is already the intended logging primitive. Treat the package as the view layer; treat spatie/laravel-activitylog as the contract your application code depends on, so that swapping the UI later is a contained change.
Migration path. (1) Confirm Backpack and Spatie major versions and pin both in composer.json. (2) Install Spatie first and validate the migration against any pre-existing hand-rolled audit table — reconcile or rename rather than running two parallel logs. (3) Add the Backpack package and publish its config. (4) Attach the trait to one low-risk model, with an explicit logOnly allowlist. (5) Wire authorization through the existing Backpack permission layer so log visibility is role-scoped.
Compatibility. Verify the Laravel/PHP matrix for the resolved Spatie major; v5's schema differs from v4, and a half-migrated table will produce confusing UI output. Check whether the package's views assume a specific Backpack theme version. Confirm the causer morph resolution works for your auth guards (sanctum, multi-guard, impersonation).
Sequencing. Phase 1: single model, dev environment, measure query count and write latency. Phase 2: expand to models with genuine audit value, add composite indexes on (subject_type, subject_id) and created_at. Phase 3: retention policy — a scheduled prune command or partitioning — before volume grows. Phase 4: role-based UI exposure and export. Do not invert this order; retention implemented after the table is large is a painful backfill.
Maintenance. Low ongoing effort in steady state — the package is thin and changes track Backpack releases. The real maintenance surface is config drift: traits, logOnly lists, and retention rules live in application code and will rot silently as models evolve. Assign explicit ownership of the activity-log configuration.
Support. Escalation path is Backpack's GitHub issues and, for license holders, their commercial support. With 0 dependents and a small user base, community answers will be sparse; expect to read the source, which is feasible given its size.
Scaling. The bottleneck is the activity_log table, not the package. At high write volume, expect index bloat and slow filtered list views. Mitigations: aggressive logOnly, async logging via a queued logger, monthly partitioning or archival, and cursor-based pagination in custom views if the default paginator struggles.
Failure modes.
causer for queue/API/CLI writes, producing orphaned log rows.Ramp-up. For a developer fluent in Backpack: half a day to productive, two days to production-ready including retention and authorization. For a team without Backpack: not recommended — the learning cost is the framework, not the package, and the same outcome is reachable with Spatie plus a small custom read-only screen. Overall, this is a reasonable convenience purchase inside the Backpack ecosystem and a poor fit outside it; the low score reflects narrow applicability rather than poor quality.
How can I help you explore Laravel packages today?