@php use App\Support\AgeingBucket; $maxTotal = collect($rows)->max('total') ?: 1; @endphp
{{ $title }} — exact month bands
@foreach ($buckets as $bucket) @endforeach @forelse ($rows as $row) @foreach ($buckets as $bucket) @php $count = $row['counts'][$bucket] ?? 0; @endphp @endforeach @empty @endforelse @if ($rows !== []) @foreach ($buckets as $bucket) @endforeach @endif
{{ $title === 'By region' ? 'Region' : 'Category' }} {{ AgeingBucket::shortLabel($bucket) }} Total
{{ $row['label'] }}
@foreach ($buckets as $bucket) @php $share = $row['total'] ? ($row['counts'][$bucket] / $row['total']) * 100 : 0; @endphp @if ($share > 0)
@endif @endforeach
@if ($count > 0) {{ $count }} @else 0 @endif {{ $row['total'] }}
No records to break down yet.
Total{{ collect($rows)->sum(fn ($r) => $r['counts'][$bucket] ?? 0) }}{{ collect($rows)->sum('total') }}