Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
francoism90 committed Jul 8, 2024
1 parent 8fe7a00 commit c9379b4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Support/Html/Mixins/LinkElementMixin.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ public function route(): mixed
return function (string $route, ...$parameters) {
/** @var A $this */

return $this->href(route($route, ...$parameters));
$href = route($route, ...$parameters);

return $this
->href($href)
->class([
'link-active' => request()->routeIs($route) || request()->fullUrlIs($href),
]);
};
}
}

0 comments on commit c9379b4

Please sign in to comment.