{{-- Month period filter (GSTR) --}} @php $months = $months ?? []; if ($months === []) { $cursor = now()->subMonths(24)->startOfMonth(); $end = now()->addMonths(1)->startOfMonth(); while ($cursor <= $end) { $months[] = $cursor->format('Y-m'); $cursor->addMonth(); } $months = array_reverse($months); } @endphp