@extends('layouts.app') @section('title', 'Audit Logs') @section('content') @php // Colour families so scanning the log is quicker. $tone = function (string $action) { return match (true) { str_contains($action, 'delete') || str_contains($action, 'archive') => 'danger', str_contains($action, 'create') || str_contains($action, 'import') => 'success', str_contains($action, 'login') || str_contains($action, 'logout') => 'secondary', str_contains($action, 'impersonation') => 'warning', str_contains($action, 'update') || str_contains($action, 'password') || str_contains($action, 'role') || str_contains($action, 'settings') => 'primary', default => 'info', }; }; @endphp
{{ number_format($logs->total()) }} matching {{ Str::plural('entry', $logs->total()) }} of {{ number_format($total) }} total.
| When | Action | By | Description | IP |
|---|---|---|---|---|
|
{{ $log->created_at?->format('d M Y H:i') }}
{{ $log->created_at?->diffForHumans() }}
|
{{ str_replace('_', ' ', $log->action) }} | {{ $log->user?->name ?? 'System' }} | {{ $log->description }} @if($log->new_values) @endif | {{ $log->ip_address ?: '—' }} |
|
Recorded values
{{ json_encode($log->new_values, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) }}
|
||||
| No log entries match your filters. | ||||