YipiiYipii Mobility Docs
Management

Audit Log

Every write to the system is logged. Find who changed what, when, and what the previous value was.

Audit Log

Every create, update, and delete across the mobility app is captured in the audit log. It's the single place a compliance officer, a curious manager, or an incident responder can go to answer "who did that?" without digging through application logs.

The log page lives at Settings → Audit Log. Admins and fleet managers can see everything for their tenant; other roles see entries scoped to records they can access.

What's logged

Every model that uses the LogsActivity trait (spatie/laravel-activitylog) emits an entry on:

  • Create — the full attribute set of the new record.
  • Update — only the fields that actually changed, with old and new values.
  • Delete — the full attribute set immediately before deletion (soft or hard).

Models currently under audit:

CategoryModels
AssetsAsset, AssetPhoto, AssetPresence
MaintenanceWorkOrder, WorkOrderLabor, WorkOrderPart, WorkOrderExpense, Inspection, InspectionItem, ServiceSchedule
Drivers & timeDriver, DriverAssetAssignment, TimeEntry, PayPeriod, UserPayProfile
InventoryPart, PartsUsage, StockMovement, PurchaseOrder, PurchaseOrderLine, PurchaseOrderReceipt
ComplianceDocument, DocumentVersion, License, Warranty, WarrantyClaim, Recall, AssetRecall
UsersUser, Role, Permission, role assignments
AutomationsAutomation, AutomationLog (also carries the trigger + action audit)

Reads are not logged by default. If you need read-audit for a sensitive entity (typically Documents), enable it via DocumentAccessLog — the system ships with access logging specifically for the Documents module.

Entry fields

Every audit log row carries:

FieldValue
log_nameA human-readable category, usually the model name (e.g. asset, work_order).
descriptionEvent verb — created, updated, deleted, restored.
subject_type / subject_idPolymorphic reference to the record that was changed.
causer_type / causer_idWho did it — usually User but can be System for scheduled jobs.
propertiesJSON blob: { old: {...}, attributes: {...} } on updates; just attributes on creates.
tenant_idEvery entry is tenant-scoped via the LogsActivity trait's global scope.
created_atWhen it happened.

Reviewing entries

The Audit Log page is a filterable table:

  • User — async picker; entries where causer_id matches.
  • Entity type — dropdown of logged models.
  • Entity ID — free-text to drill to a specific record.
  • Actioncreated / updated / deleted / restored.
  • Date range — inclusive.

Clicking any row opens a drawer with:

  • The causing user's avatar + role.
  • The subject with a deep link (e.g. "Work Order #1284").
  • A diff view showing each changed field with the previous value struck through and the new value in green.
  • The raw properties JSON for anyone who needs it.

Per-record history

Every detail page that carries an audited model has a History tab that prefilters the audit log by that record. One click from any asset, WO, inspection, or driver to the complete change history of that specific record.

Retention

Audit entries are kept indefinitely by default — rotating them out is a destructive operation we'd rather not make easy. If you need to trim (e.g. GDPR right-to-erasure), contact support for an assisted purge.

Exporting

The filtered list has a Export CSV button. Entries are streamed (no row cap) with every field above flattened to CSV.

Permissions

  • Admin / Fleet Manager — full access, any user's actions.
  • All other roles — can see audit entries where subject_id is a record they're authorised to read. A mechanic sees audit entries on work orders they can access, but not on user-management entries.

API

Read-only, paginated, filter-rich:

GET /api/{tenant}/activity-logs?filter[causer_id]=123&filter[subject_type]=asset&filter[from]=2026-04-01
  • Documents → Access Log — read audit for the sensitive-document module.
  • Permissions — what each role can see in the log.
  • API Keys — tokens carry a causer_id, so API-driven changes still land with a proper user attribution.

On this page