@php // The server decides which item matches the page; the script only swaps it while a drawer is open. $activeItem = match (true) { request()->routeIs('storefront.home') => 'home', request()->routeIs('storefront.category.show') => 'categories', request()->routeIs('storefront.cart', 'storefront.checkout', 'storefront.checkout.*') => 'cart', request()->routeIs('login', 'register', 'account', 'account.*', 'auth.two-factor.challenge') => 'account', default => null, }; @endphp
Categories are not available right now.
@endif