10 months ago

Why did not Laravel 5.6 active menu item highlight using request?

Posted 10 months ago by Amalmax

Hi, working with laravel 5.6 and develop sidemenu bar with bootstarp. I am using request to highlight current menu items here. but it is not highlight when it is in current menu.

<li class="{{ Request::is('products*') ? 'active' : '' }}">

    <a href="{!! route('products.index') !!}"><span>Products</span></a>


<li class="{{ Request::is('tags*') ? 'active' : '' }}">

    <a href="{!! route('tags.index') !!}"><span>Tags</span></a>


<li class="{{ Request::is('items*') ? 'active' : '' }}">

    <a href="{!! route('items.index') !!}"><span>Items</span></a>


how can I fix this problem?

Please sign in or create an account to participate in this conversation.