@extends('layouts.app') @section('content') @php $classify = function ($action) { if (str_contains($action, 'deleted') || str_contains($action, 'failed') || str_contains($action, 'rejected') || str_contains($action, 'password')) { return ['label' => 'Security', 'dot' => 'bg-red-700', 'badge' => 'bg-red-50 text-red-700', 'icon' => 'warning']; } if (str_contains($action, 'created') || str_contains($action, 'approved') || str_contains($action, 'updated') || str_contains($action, 'restored')) { return ['label' => 'Success', 'dot' => 'bg-[var(--construct-primary)]', 'badge' => 'bg-emerald-50 text-emerald-700', 'icon' => 'check_circle']; } if (str_contains($action, 'export') || str_contains($action, 'download')) { return ['label' => 'Export', 'dot' => 'bg-[var(--construct-secondary)]', 'badge' => 'bg-blue-50 text-blue-700', 'icon' => 'download']; } return ['label' => 'System', 'dot' => 'bg-[var(--construct-border)]', 'badge' => 'bg-[var(--construct-surface-low)] text-[var(--construct-muted)]', 'icon' => 'settings']; }; $entityName = function ($auditLog) { if (! $auditLog->auditable_type) { return 'System'; } return class_basename($auditLog->auditable_type).($auditLog->auditable_id ? ' #'.$auditLog->auditable_id : ''); }; $initials = fn ($name) => collect(explode(' ', $name ?: 'System'))->filter()->map(fn ($part) => substr($part, 0, 1))->take(2)->implode(''); $selectedClass = $selectedAuditLog ? $classify($selectedAuditLog->action) : null; @endphp
Trace user actions, document activity, exports, security events, and system operations.
| Timestamp | User | Action | Entity | Location / IP | Details |
|---|---|---|---|---|---|
|
{{ $auditLog->created_at->format('M j, H:i:s') }}
UTC{{ $auditLog->created_at->format('P') }}
|
{{ $initials($auditLog->user?->name ?? 'System') }}
{{ $auditLog->user?->name ?: 'System Service' }}
|
{{ str($auditLog->action)->replace(['.', '_'], ' ')->title() }}
{{ $auditLog->description }} |
{{ $entityName($auditLog) }} | {{ $auditLog->ip_address ?: 'Not captured' }} | chevron_right |
| No audit entries found. | |||||