title: collapsible panel in laravel
body: <p>I was trying to make collapsible panel in laravel. I am not sure how to make following line dynamic</p>
  
  <pre><code>&lt;div id="collapse1" class="panel-collapse collapse"&gt; 
  </code></pre>
  
  <p>I was trying to do it the following ways but it did not work</p>
  
  <pre><code>@foreach($cons as $con )
  &lt;div class="panel-group"&gt;
  &lt;div class="panel panel-default"&gt;
  &lt;div class="panel-heading"&gt;
    &lt;h4 class="panel-title"&gt;
      &lt;a data-toggle="collapse" href="#collapse1"&gt;&lt;img alt="{{$con-&gt;image}}" src="{{URL::asset('albums/'.$con-&gt;image)}}" width="200" height="200"&gt;&lt;/a&gt;
    &lt;/h4&gt;
  &lt;/div&gt;
  &lt;div id="collapse{{$con-&gt;id}}" class="panel-collapse collapse"&gt;
    &lt;div class="panel-body"&gt;{{$con-&gt;title}}&lt;/div&gt;
    &lt;div class="panel-footer"&gt;{!!$con-&gt;details!!}&lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  @endforeach 
  </code></pre>