diff --git a/src/Support/Html/Mixins/LinkElementMixin.php b/src/Support/Html/Mixins/LinkElementMixin.php index 1b7995f..4843805 100644 --- a/src/Support/Html/Mixins/LinkElementMixin.php +++ b/src/Support/Html/Mixins/LinkElementMixin.php @@ -14,12 +14,12 @@ public function link(): mixed $href = route($route, ...$parameters); return $this - ->attribute('wire:navigate') - ->href($href) - ->class([ - 'link', - 'link-active' => request()->routeIs($route, "{$route}.*") || request()->fullUrlIs($href), - ]); + ->attributes([ + 'wire:navigate', + 'wire:current' => 'link-active', + ]) + ->class('link') + ->href($href); }; }