@extends('layouts.layout-horizontal') @section('title', 'Activity Logs') @section('content')
User Activity Logs
{{-- Filter Form --}}
{{-- Activity Stats --}}
Created
{{ $activities->where('action', 'created')->count() }}
Updated
{{ $activities->where('action', 'updated')->count() }}
Deleted
{{ $activities->where('action', 'deleted')->count() }}
Total
{{ $activities->total() }}
{{-- Activity Table --}}
@forelse($activities as $activity) @empty @endforelse
Date & Time User Action Type Description Company Details
{{ $activity->created_at->format('d-M-Y') }}
{{ $activity->created_at->format('h:i A') }}
{{ $activity->user->name ?? 'Unknown' }} @if($activity->action === 'created') Created @elseif($activity->action === 'updated') Updated @elseif($activity->action === 'deleted') Deleted @else {{ ucfirst($activity->action) }} @endif {{ $activity->model_label }} {{ $activity->description }} {{ $activity->company->name ?? '-' }}
No activity logs found for the selected filters.
{{-- Pagination --}}
{{ $activities->links('pagination::bootstrap-5') }}
@endsection