@php $hours24 = $this->last24Hours; $peak24 = max(1, collect($hours24)->max('bytes')); $daily = $this->dailyUsage; $dailyPeak = max(1, collect($daily)->max(fn ($d) => $d['up'] + $d['down'])); $peakHours = $this->peakHours; $peakHourMax = max(1, max($peakHours)); $trend = $this->paymentTrend; $trendPeak = max(1, collect($trend)->max('total')); $busiest = array_search(max($peakHours), $peakHours, true); $dayTotal = collect($daily)->sum(fn ($d) => $d['up'] + $d['down']); $activeDays = collect($daily)->filter(fn ($d) => $d['up'] + $d['down'] > 0)->count(); @endphp {{-- Live counters. Refreshed on a poll rather than streamed: the numbers come from the accounting poller, which reads the router once a minute. --}}
{{ $stats['is_live'] ? __('Connected :for', ['for' => $stats['live_since']?->diffForHumans(null, true, true)]) : __('Not connected right now') }}
{{ __('Monthly payments · last 12 months') }}
{{ __('Daily traffic · this month so far') }}
{{ __('Average traffic by hour of day · last 30 days') }}
{{ __('Traffic is measured from the moment accounting started collecting. Sessions before that were never counted, so history begins there rather than at signup.') }}
@endif