title: Laravel sidebar set active tab when page are open
body: <p>How can I set active selected tab and and also open the sub tab if the page I'm on is a sub page on my sidebar? For example if I open <code>Contractor Association</code> page, the <code>Users</code> tab should expand the highlight <code>Contractor Association</code> tab. Right now every time I open a new page the sidebar is will reset back</p>
  
  <pre><code> &lt;ul class="navbar-nav"&gt;
      &lt;li class="nav-item"&gt;
          &lt;a class="nav-link {{ (request()-&gt;is('home')) ? 'text-primary' : '' }}"
              href="{{ route('dev-admin.home') }}"&gt;
              &lt;i class="ni ni-tv-2"&gt;&lt;/i&gt; {{ __('Dashboard') }}
          &lt;/a&gt;
      &lt;/li&gt;
      &lt;li class="nav-item"&gt;
          &lt;a class="nav-link {{ (strpos(Route::currentRouteName(), 'dev-admin.home') == 0) ? 'text-primary' : '' }}"
              href="#users" data-toggle="collapse" role="button" aria-expanded="true" aria-controls="users"&gt;
              &lt;i class="fa fa-users"&gt;&lt;/i&gt;
              &lt;span class="nav-link-text"&gt;{{ __('Users') }}&lt;/span&gt;
          &lt;/a&gt;
          &lt;div class="collapse {{ (request()-&gt;is('dev-admin/developer-admins*') ? 'show' : '' }}"
              id="users"&gt;
              &lt;ul class="nav nav-sm flex-column"&gt;
                  &lt;li class="nav-item"&gt;
                      &lt;a class="nav-link {{ (request()-&gt;is('developer-admins')) ? 'text-primary' : '' }}"
                          href="{{ route('dev-admin.developer-admins.index') }}"&gt;
                          {{ __('Admins') }}
                      &lt;/a&gt;
                      &lt;a class="nav-link {{ (request()-&gt;is('dev-admin/defect-types*')) ? 'text-primary' : '' }}"
                          href="{{ route('dev-admin.clerk-of-works.index') }}"&gt;
                          {{ __('Clerks of Work') }}
                      &lt;/a&gt;
                      &lt;a class="nav-link {{ (request()-&gt;is('developer-admins')) ? 'text-primary' : '' }}"
                          href="{{ route('dev-admin.developer-contractor-associations.index') }}"&gt;
                          {{ __('Contractor Association') }}
                      &lt;/a&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>