@extends('layouts.sadmin') @section('title', 'Audit Logs') @section('content')
Permanent, tamper-proof system activity log
| Time | Company | User | Action | Module | Record | Description | IP Address | Detail |
|---|---|---|---|---|---|---|---|---|
|
{{ $log->created_at->format('d M Y') }}
{{ $log->created_at->format('H:i:s') }}
|
@if($log->company_id) @php $co = $companies->firstWhere('id', $log->company_id); @endphp {{ $co?->name ?? 'ID:'.$log->company_id }} @else — @endif |
@if($log->user_type === 'super_admin')
Super Admin
@else
User
@endif
ID: {{ $log->user_id ?? '—' }}
|
@php $actionColors = [ 'login' => '#d1e7dd|#0a3622', 'logout' => '#e9ecef|#495057', 'create' => '#cfe2ff|#084298', 'update' => '#fff3cd|#664d03', 'delete' => '#f8d7da|#842029', 'post' => '#d1e7dd|#0a3622', 'approve' => '#d1e7dd|#0a3622', 'reject' => '#fff3cd|#664d03', 'failed_login' => '#f8d7da|#842029', 'status_change' => '#fff3cd|#664d03', 'password_change'=> '#cfe2ff|#084298', ]; [$bg,$fg] = explode('|', $actionColors[$log->action] ?? '#e9ecef|#495057'); @endphp {{ str_replace('_',' ',ucfirst($log->action)) }} | {{ $log->module }} |
@if($log->record_id)
#{{ $log->record_id }}
@else
—
@endif
|
{{ Str::limit($log->description, 60) }} | {{ $log->ip_address }} |
@if($log->old_values || $log->new_values) @else — @endif |
| No audit records found for the selected filters | ||||||||