@php
$kpis = [
['Total Visits', $summary['total_visits'] ?? 0, 'text-orange-500'],
['Avg / Day', number_format($summary['avg_per_day'] ?? 0, 1), 'text-blue-500'],
['Avg Duration', ($summary['avg_duration_min'] ?? 0) . ' min', 'text-green-600'],
['Unique Members', $summary['unique_members'] ?? 0, 'text-purple-500'],
['Denied', $summary['denied_count'] ?? 0, 'text-red-500'],
];
@endphp
@foreach($kpis as [$label, $value, $color])
@endforeach
Hourly Heatmap
@php $maxHour = collect($hourly_data)->max() ?: 1; @endphp
@foreach($hourly_data as $hour => $count)
@php $intensity = $count / $maxHour; @endphp
@endforeach
@foreach(range(0, 23, 6) as $h)
{{ sprintf('%02d', $h) }}:00
@endforeach
23:00
@endif