1
2<li class="{{ Request::is('products*') ? 'active' : '' }}">
3
4 <a href="{{ route('products.index') }}"><span>Products</span></a>
5
6</li>
1
2<li class = "{{ set_active('admin/users') }}">
3 <a href="{{ url('/admin/users/') }}">Users</a>
4</li>
1function set_active( $route ) {
2 if( is_array( $route ) ){
3 return in_array(Request::path(), $route) ? 'active' : '';
4 }
5 return Request::path() == $route ? 'active' : '';
6}
7