@extends('layouts.app') @section('title', 'Audit Log') @section('content') @include('partials.flash') @php // Friendly label + colour per event family. $eventMeta = function ($e) { return match (true) { $e === 'auth.login' => ['Sign in', 'bg-primary/10 text-primary', 'login'], $e === 'auth.logout' => ['Sign out', 'bg-surface-container-high text-on-surface-variant', 'logout'], $e === 'auth.failed' => ['Failed sign-in', 'bg-error-container text-error', 'gpp_bad'], $e === 'auth.lockout' => ['Lockout', 'bg-error-container text-error', 'lock'], str_starts_with($e, 'auth.password') => ['Password', 'bg-gold/20 text-[#8a6d3b]', 'key'], str_starts_with($e, 'course') => ['Course', 'bg-primary/10 text-primary', 'school'], str_starts_with($e, 'settings') => ['Settings', 'bg-gold/20 text-[#8a6d3b]', 'settings'], str_starts_with($e, 'users') => ['Users', 'bg-secondary-container text-on-secondary-container', 'group'], default => [\Illuminate\Support\Str::headline($e), 'bg-surface-container-high text-on-surface-variant', 'bolt'], }; }; @endphp {{-- Filters --}}
{{-- Log table --}}| When | User | Event | Description | IP |
|---|---|---|---|---|
| {{ optional($log->created_at)->format('j M Y · H:i') }} | @if($log->user) {{ $log->user->name }} {{ $log->user->email }} @else {{ $log->properties['email'] ?? 'Guest / system' }} @endif | {{ $icon }} {{ $label }} |
{{ $log->description }}
@php $props = $log->properties ?? []; @endphp
@if(!empty($props['bounced_emails']) || !empty($props['failed_emails']))
chevron_right Emails to check
@if(!empty($props['bounced_emails']))
Welcome email rejected ({{ count($props['bounced_emails']) }}): {{ implode(', ', $props['bounced_emails']) }} Not created ({{ count($props['failed_emails']) }}): {{ implode(', ', $props['failed_emails']) }} |
{{ $log->ip_address ?? '—' }} |
| No audit entries match these filters. | ||||