@extends('layouts.dashboard') @section('title', 'Audit Logs') @section('page-title', 'Audit Logs') @section('content')
Track all admin actions for security and compliance
| Timestamp | Admin | Action | Resource | Details | IP Address |
|---|---|---|---|---|---|
|
{{ $log->created_at->format('M d, Y') }}
{{ $log->created_at->format('H:i:s') }}
|
{{ strtoupper(substr($log->admin->name ?? 'X', 0, 2)) }}
{{ $log->admin->name ?? 'Unknown' }}
{{ $log->admin->email ?? '' }}
|
@php $actionColor = match($log->action) { 'login' => 'success', 'logout' => 'secondary', 'create' => 'primary', 'update' => 'info', 'delete' => 'danger', 'toggle_status' => 'warning', 'force_logout' => 'warning', 'reset_password' => 'warning', 'permission_denied' => 'danger', 'view_sensitive' => 'dark', default => 'secondary', }; @endphp {{ ucwords(str_replace('_', ' ', $log->action)) }} | @if($log->resource_type) {{ ucfirst($log->resource_type) }} @if($log->resource_id) #{{ $log->resource_id }} @endif @else - @endif |
@if($log->new_values || $log->old_values)
|
{{ $log->ip_address ?? 'N/A' }}
|
| No audit logs found | |||||