'/dashboard', 'label' => 'Home', 'key' => 'home'], ['href' => '/groups', 'label' => 'Groups', 'key' => 'groups'], ['href' => '/sash', 'label' => 'Sash', 'key' => 'sash'], ['href' => '/profile', 'label' => 'Profile', 'key' => 'profile'], ]; } public function isActive(string $href): bool { $path = ltrim(parse_url($href, PHP_URL_PATH) ?? $href, '/'); if ($path === '') { return request()->is('/'); } return request()->is($path) || request()->is($path . '/*'); } }; ?>