laravel 6 menu active class code example
Example 1: set nav link active on the basis of route laravel
<li class="{{ (request()->is('admin/cities*')) ? 'active' : '' }}">
Example 2: laravel assign active based on route name
<li class="{{ Request::is('products*') ? 'active' : '' }}">
<a href="{{ route('products.index') }}"><span>Products</span></a>
</li>