I\'m trying to set active class in my list item, but it doesn\'t work.
My code in blade:
@foreach($data as $site)
I like more to use this syntax to check the route since has not been mentioned.
-
Teams
Two more things:
Adding an asterisk, without a dot as route name will target all the routes that start with team, teams, etc.
If you are using any CSS framework like Bootstrap or Tailwind you can add here also the classes to style the menu item, instead of writing some CSS for it.