@extends('layouts.app') @php use Illuminate\Support\Str; @endphp @section('content')
Audit Logs
@auth @if(Auth::user()->is_admin)
@csrf
@endif @endauth
{{-- Alerts --}} @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif

{{ \App\Models\AuditLog::count() }}

Total Logs

{{ \App\Models\AuditLog::where('action','created')->count() }}

Total Created

{{ \App\Models\AuditLog::where('action','updated')->count() }}

Total Updated

{{ \App\Models\AuditLog::where('action','deleted')->count() }}

Total Deleted
Filter Logs
Clear
count() > 0) id="bookings-table" @endif class="table table-bordered align-middle text-center"> @forelse($logs as $log) @empty @endforelse
ID Table Record Action User Description Date Actions
{{ $log->id }} {{ $log->table_name }} #{{ $log->record_id }} @php $colors = [ 'created' => 'success', 'updated' => 'warning', 'deleted' => 'danger' ]; @endphp {{ ucfirst($log->action) }} {{ $log->user->name ?? 'System' }} {{ Str::limit($log->description ?? 'N/A', 60) }} {{ $log->created_at->format('d M Y') }}
{{ $log->created_at->format('h:i A') }}
@can('view audit logs') @endcan @can('delete audit logs')
@csrf @method('DELETE')
@endcan
No audit logs found.
@endsection @push('script') @endpush