Activity Log

A unified audit trail of every meaningful action across the admin panel — who, what, when, from where.

Route

GET /admin/activity

Paginated, filterable by actor, subject type, action, and date range.

Log record

ColumnNotes
idUUID PK
actor_idUUID FK → users.id (nullable for system events)
actor_nameDenormalized actor name (preserved if user deleted)
actionVerb (created, updated, deleted, published, restored, login, logout, …)
subject_typeClass of the affected model (ContentEntry, User, MediaFile, …)
subject_idUUID of the affected record
subject_labelDenormalized label (e.g. entry title) for fast list rendering
changesJSON diff: { before: {...}, after: {...} }
contextJSON metadata (ip, user agent, source: admin or api)
created_atWhen it happened

How records are written

An observer registered on the main domain models writes a row on every relevant lifecycle event. The diff is computed from the model's dirty attributes plus the JSON data column for entries.

Filtering UI

Retention

By default, activity rows are retained indefinitely. For high-volume installations, schedule a pruning job (php artisan activity:prune --days=180) to keep table size manageable.

TipPair the activity log with revisions: activity tells you who did what when; revisions let you see and restore the prior state.