@extends('layouts.user_type.auth') @section('activityLog') @include('components.alert')
All activity
{{ $logs->total() ?? 0 }} records
@forelse ($logs as $index => $log) @php $alAction = strtolower((string) $log->action); [$alTone, $alIcon] = match (true) { str_contains($alAction, 'insert') || str_contains($alAction, 'create') || str_contains($alAction, 'add') => ['z-badge--success', 'ri-add-line'], str_contains($alAction, 'delete') || str_contains($alAction, 'remove') => ['z-badge--danger', 'ri-delete-bin-line'], str_contains($alAction, 'update') || str_contains($alAction, 'edit') => ['z-badge--info', 'ri-edit-line'], default => ['', 'ri-flashlight-line'], }; $alName = $log->user?->name; $alInit = $alName ? collect(preg_split('/\s+/', trim($alName)))->filter()->take(2)->map(fn ($w) => mb_strtoupper(mb_substr($w, 0, 1)))->implode('') : 'SY'; @endphp @empty @endforelse
When Action Module Description By
{{ \Carbon\Carbon::parse($log->created_at)->format('j M Y') }}{{ \Carbon\Carbon::parse($log->created_at)->format('H:i:s') }} {{ $log->action }} {{ $log->action_module }}
{{ $log->description }}
{{ $alInit }} {{ $alName ?? 'System' }} @if($log->user?->user_type) {{ ucwords(str_replace('_', ' ', $log->user->user_type)) }} @endif
No activity found
Try a different search or clear the filters.
@include('components.pagination', ['paginator' => $logs])
@endsection