@php $metadataItems = function (?array $metadata) { if (! $metadata) { return collect(); } return collect($metadata) ->filter(fn ($value) => filled($value)) ->map(function ($value, $key) { $formattedValue = is_scalar($value) ? $value : json_encode($value); return [ 'label' => str($key)->headline()->toString(), 'value' => (string) $formattedValue, ]; }) ->take(6) ->values(); }; $activeFilterCount = collect([ $filters['search'] ?? null, $filters['action_type'] ?? null, $filters['user_id'] ?? null, $filters['entity_type'] ?? null, $filters['date_from'] ?? null, $filters['date_to'] ?? null, ])->filter(fn ($value) => filled($value))->count(); @endphp Export CSV Back to dashboard

Find activity

Filter the audit trail

Search actions, users, entities, and dates.

{{ $activeFilterCount }} active {{ Str::plural('filter', $activeFilterCount) }} {{ $logs->total() }} {{ Str::plural('result', $logs->total()) }}
Reset

Activity feed

Who, what, when.

{{ $logs->total() }} {{ Str::plural('event', $logs->total()) }} matched your current view
@forelse ($logs as $log) @php($items = $metadataItems($log->metadata))
{{ $log->actionLabel() }} @if ($log->entity_type) {{ Str::headline($log->entity_type) }} #{{ $log->entity_id }} @endif

{{ $log->description }}

Timestamp {{ $log->created_at->format('d M Y') }} {{ $log->created_at->format('H:i') }}

User

{{ $log->user?->name ?? 'System' }}

{{ $log->user?->email ?? 'Automated action' }}

Source

{{ $log->ip_address ?: 'No IP captured' }}

{{ $log->user_agent ? Str::limit($log->user_agent, 68) : 'Device metadata unavailable' }}

@empty

No audit events yet

No activity yet.

@endforelse
@if ($logs->hasPages())
{{ $logs->links() }}
@endif