Closed valpuia closed 5 months ago
v1.8.2
v10.46.0
When using route()->current() with wildcard multiple times cannot set nav-link active class.
route()->current()
You can clearly see from this video: Screencast from 02-28-2024 12:22:20 PM.webm
<NavLink href="/users" :active="route().current('users.*')">{{ $t('Users') }}</NavLink> <NavLink href="/posts" :active="route().current('posts.*')">{{ $t('Posts') }}</NavLink> // NavLink components <script setup> defineProps({ active: Boolean, }); </script> <template> <Link class="text-black dark:text-gray-300 hover:underline" :class="{ 'font-bold underline': active }"> <slot /> </Link> </template>
-
Route::resource('posts', PostController::class); Route::resource('users', UserController::class)->except(['show', 'edit']);
Ziggy version
v1.8.2
Laravel version
v10.46.0
Description
When using
route()->current()
with wildcard multiple times cannot set nav-link active class.You can clearly see from this video: Screencast from 02-28-2024 12:22:20 PM.webm
Ziggy call and context
Ziggy configuration
Route definition