title: Setting Bootstrap navbar active class in Laravel 5
body: <p>I've been wondering around looking for solutions, but can't really understand especially when creating helpers. I'm new in Laravel and I want a simple or if not a detailed instruction on how to set the active class for my bootstrap navbar.</p>
  <p>Here's what I've done so far, but can't get it done:</p>
  <pre><code>&lt;div class=&quot;header clearfix&quot;&gt;
          &lt;nav&gt;
            &lt;ul class=&quot;nav nav-pills pull-right&quot;&gt;
              &lt;li class=&quot;&quot;&gt;&lt;a href=&quot;{{ url('/') }}&quot;&gt;Home&lt;/a&gt;
              &lt;/li&gt;
              &lt;li {{ Request::is('about*') ? ' class=&quot;active&quot;' : null }}&gt;&lt;a href=&quot;{{ url('about') }}&quot;&gt;About Us&lt;/a&gt;
              &lt;/li&gt;
              &lt;li&gt;&lt;a href=&quot;{{ url('auth/login') }}&quot;&gt;Login&lt;/a&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
      &lt;/nav&gt;
      &lt;h2 class=&quot;&quot;&gt;Tobacco Prevention and Control Program&lt;/h2&gt;
  &lt;/div&gt;
  </code></pre>
  <p><strong>EDIT</strong></p>
  <p>Setting <code>class=&quot;active&quot;</code> will make all nav-pills active. The intended effect is that only the <code>li</code> of the current page have the <code>active</code> class.</p>