@extends('layouts.app') @section('content')

Activity Logs - {{ $user->username }}

{{ substr($user->username, 0, 1) }}
{{ $user->username }}

{{ $user->email }}

{{ $user->role_name }} @if($user->is_active) Active @else Inactive @endif

{{ $auditLogs->total() }}

Total Logs

{{ $auditLogs->where('created_at', '>=', now()->subDays(7))->count() }}

Last 7 Days

{{ $auditLogs->where('created_at', '>=', now()->subDays(1))->count() }}

Last 24 Hours
@if($auditLogs->count() > 0)
@foreach($auditLogs as $log) @endforeach
Action Description IP Address User Agent Timestamp
{{ ucfirst($log->action) }} {{ $log->description }} @if($log->details)
{{ $log->details }} @endif
@if($log->ip_address) {{ $log->ip_address }} @else N/A @endif @if($log->user_agent) {{ Str::limit($log->user_agent, 50) }} @else N/A @endif
{{ $log->created_at->format('M d, Y') }}
{{ $log->created_at->format('H:i:s') }}
{{ $log->created_at->diffForHumans() }}
Showing {{ $auditLogs->firstItem() }} to {{ $auditLogs->lastItem() }} of {{ $auditLogs->total() }} entries
{{ $auditLogs->links() }}
@else

No activity logs found

No audit logs available for this user.

@if(request()->anyFilled(['search', 'type', 'date_from', 'date_to'])) Clear Filters @endif
@endif
@endsection @section('styles') @endsection