@if ($histories->isEmpty())
No records found

Try adjusting your search or filters

@else
@foreach ($histories as $key => $history) @endforeach
# User Action Module Reference IP Address Date & Time Status
{{ $histories->firstItem() + $key }}
@if ($history->user) {{ $history->user->name }} @else System @endif
@if ($history->user) {{ $history->user->name }} @else System @endif
{{ $history->user_type ?? 'System' }}
@if (Lang::has("plugins/audit-log::history.$history->action")) {{ trans("plugins/audit-log::history.$history->action") }} @else {{ $history->action }} @endif @if (Lang::has("plugins/audit-log::history.$history->module")) {{ trans("plugins/audit-log::history.$history->module") }} @else {{ $history->module }} @endif @if ($history->reference_name) {{ Str::limit($history->reference_name, 30) }} @else - @endif {{ $history->ip_address }}
{{ $history->created_at->format('M d, Y') }}
{{ $history->created_at->format('h:i A') }}
@php // Define action status options with badges $actionStatusOptions = [ 'created' => ['name' => 'Created', 'class' => 'bg-success'], 'updated' => ['name' => 'Updated', 'class' => 'bg-info'], 'deleted' => ['name' => 'Deleted', 'class' => 'bg-danger'], 'login' => ['name' => 'Login', 'class' => 'bg-primary'], 'logout' => ['name' => 'Logout', 'class' => 'bg-secondary'], ]; $actionStatusName = $history->action; $actionBadgesClass = 'bg-secondary'; foreach ($actionStatusOptions as $action => $option) { if (str_contains($history->action, $action)) { $actionStatusName = $option['name']; $actionBadgesClass = $option['class']; break; } } @endphp {{ $actionStatusName }}
@foreach ($histories as $key => $history)
@if ($history->user) {{ $history->user->name }} @else System @endif
@if ($history->user) {{ $history->user->name }} @else System @endif
{{ $history->user_type ?? 'System' }}
{{ $actionStatusName }}
Action @if (Lang::has("plugins/audit-log::history.$history->action")) {{ trans("plugins/audit-log::history.$history->action") }} @else {{ $history->action }} @endif
Module @if (Lang::has("plugins/audit-log::history.$history->module")) {{ trans("plugins/audit-log::history.$history->module") }} @else {{ $history->module }} @endif
Reference @if ($history->reference_name) {{ Str::limit($history->reference_name, 30) }} @else - @endif
Date & Time
{{ $history->created_at->format('M d, Y') }}
{{ $history->created_at->format('h:i A') }}
@endforeach
@endif