{{-- Smart Report v2 - "smart-report.pdf" template group (CBR + CBC + BTS/WTS + HE). --}} {{-- PR1: Scaffold with patient header + 4-up card grid. PR2 finalises the card internals. --}} @php /** @var array $group Group view-model built by SmartReportV2Service */ $packages = $group['packages'] ?? []; $firstPackage = $group['firstPackage'] ?? ($packages[0] ?? null); // Split into 4-up pages the same way SmartReportService::GetCbrPDF does // (key % 4 === 0 triggers a new page in FPDI). $pages = array_chunk($packages, 4); @endphp @foreach ($pages as $pageIdx => $pagePackages)