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

Activity Log

Track all admin actions performed on the website.
@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)
@foreach($logs as $log) @endforeach
Admin Action Description Date
{{ $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') }}
{{ $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