title: Laravel active menu item for url included parameters
body: <p>I'm trying to set active class in my list item, but it doesn't work.</p>
  
  <p>My code in blade:</p>
  
  <pre><code>@foreach($data as $site)
    &lt;ul class="sidebar-menu" id="second-menu"&gt;
    @if(isAdmin())&lt;li class="{{-- active class  for url parameter --}}"&gt;&lt;a href="{{ url('sites/'.$site-&gt;id.'/edit') }}" &gt;{{ $site-&gt;name }}&lt;/a&gt;&lt;/li&gt;
  @endif
  &lt;/ul&gt;
  @endforeach
  </code></pre>
  
  <p>So, if I write: li class="@if(getRouteName() == 'site@index'){{ 'active' }}@endif" , it works nice, but in my case the problem is that I want to get <strong>'active'</strong> class in foreach <strong>sites/'.$site->id.'/edit</strong></p>
  
  <p>Many thanks.</p>