is route active laravel code example
Example 1: laravel assign active based on route name
<li class="{{ Request::is('products*') ? 'active' : '' }}">
<a href="{{ route('products.index') }}"><span>Products</span></a>
</li>
Example 2: laravel assign active based on route name
<li class = "{{ set_active('admin/users') }}">
<a href="{{ url('/admin/users/') }}">Users</a>
</li>