title: Laravel Blade: Increment variable by 1 each time?
body: <p>Using Laravel blade template, is there a way to include a variable and increase each time in the foreach or what is better approach?</p>
  
  <p>For example:</p>
  
  <pre><code>@foreach($categories as $category)
    &lt;li&gt;&lt;a href="#tab_c1" role="tab" data-toggle="tab"&gt;{{$category-&gt;name}}&lt;/a&gt;&lt;/li&gt;
  @endforeach
  </code></pre>
  
  <p>In the <code>foreach</code> block, the value from #tab_c1 will need to be increase. eg: <code>#tab_c1, #tab_c2, #tab_c3</code></p>