@extends('layouts.app') @section('title', 'Audit Log') @section('content')
Every create/update/delete action on orders, payments, journal entries, products, staff accounts, and purchase orders is recorded here automatically — user, timestamp, and what changed. This log itself cannot be edited or deleted through the app.
| When | Staff | Action | Record | Changed |
|---|---|---|---|---|
| {{ $log->created_at->format('d M Y h:i A') }} | {{ $log->user->name ?? 'System' }} | {{ ucfirst($log->action) }} | {{ $log->model_type }} #{{ $log->model_id }} |
@if ($log->action === 'updated' && $log->new_values)
@foreach ($log->new_values as $field => $newVal)
{{ $field }}: {{ is_scalar($log->old_values[$field] ?? null) ? $log->old_values[$field] : json_encode($log->old_values[$field] ?? null) }} → {{ is_scalar($newVal) ? $newVal : json_encode($newVal) }}
@endforeach
@endif
|
| No audit activity matches this filter. | ||||