@include('partials.admin-filter', [
'action' => route('admin.activity-log'),
'q' => $q,
'searchPlaceholder' => 'Search by admin name or description…',
'selects' => [
['name' => 'action', 'value' => $action, 'all' => 'All actions', 'options' => ['created' => 'Created', 'updated' => 'Updated', 'deleted' => 'Deleted']],
],
'active' => $q !== '' || $action !== '',
])
@if($logs->count() > 0)
| Admin |
Action |
Description |
Date |
@foreach($logs as $log)
| {{ $log->admin?->name ?? 'System' }} |
@if($log->action === 'created')
{{ $log->action }}
@elseif($log->action === 'updated')
{{ $log->action }}
@elseif($log->action === 'deleted')
{{ $log->action }}
@else
{{ $log->action }}
@endif
|
{{ $log->description }} |
{{ $log->created_at->format('d M Y H:i') }} |
@endforeach
{{ $logs->links() }}
@else
{{ ($q !== '' || $action !== '') ? 'No matching activity' : 'No Activity Yet' }}
{{ ($q !== '' || $action !== '') ? 'Try adjusting your search or filter.' : 'Admin actions will be logged here as they occur.' }}
@endif
@endsection