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