<li class="nav-item {{request()->is('tracks') ? 'active' : ''}}"> laravel 8 code example
Example: set nav link active on the basis of route laravel
<li class="{{ (request()->is('admin/cities*')) ? 'active' : '' }}">
<li class="{{ (request()->is('admin/cities*')) ? 'active' : '' }}">