@props(['active' => null]) @php /* * Which nav item is lit. * * Route names alone are not enough. Blog posts and service pages both * live at flat root URLs and are served by SlugRouterController under the * single `page.show` route, so routeIs('posts.*') and routeIs('services.*') * are both false on exactly the pages the legacy header lit up. Those * views pass `nav` explicitly; everything else still derives. */ $on = fn (string $section, string ...$routes): bool => $active === $section || ($active === null && request()->routeIs(...$routes)); @endphp