laravel add active class checking url code example
Example 1: laravel sidebar menu active
{{ request()->routeIs('news.*') ? 'active' : '' }}
Example 2: laravel assign active based on route name
<li class = "{{ set_active('admin/users') }}">
<a href="{{ url('/admin/users/') }}">Users</a>
</li>