@php
$groupedLogs = $logs->groupBy(function($log) {
return $log->created_at->format('d M, Y');
});
@endphp
@forelse($groupedLogs as $date => $dayLogs)
@foreach($dayLogs as $log)
{{ strtoupper(substr($user->name, 0, 1)) }}
{{ $user->name }}
@if($log->action == 'login')
logged in
@elseif($log->action == 'logout')
logged out
@elseif($log->action == 'profile_update')
updated Profile Information
@elseif($log->action == 'clicked_next')
navigated to Next Step
@elseif($log->action == 'clicked_back')
navigated back to Previous Step
@else
performed {{ str_replace('_', ' ', $log->action) }}
@endif
• {{ $log->created_at->diffForHumans() }}
{{ $log->description }}
@if($log->ip_address)
(IP: {{ $log->ip_address }})
@endif
@endforeach
@empty
No activity logs found for this user.
@endforelse