@php $presets = [ 'This month' => [now()->startOfMonth(), now()], 'Last month' => [now()->subMonthNoOverflow()->startOfMonth(), now()->subMonthNoOverflow()->endOfMonth()], 'This quarter' => [now()->firstOfQuarter(), now()], 'Financial year' => [now()->month >= 4 ? now()->copy()->month(4)->startOfMonth() : now()->copy()->subYear()->month(4)->startOfMonth(), now()], ]; @endphp
@foreach ($presets as $label => [$a, $b]) @php($on = $from->isSameDay($a) && $to->isSameDay($b)) {{ $label }} @endforeach
@isset($export) @can('data.export') @endcan @endisset