title: How to get dynamic data in bootstrap modal by using Laravel?
body: <p>I am developing an app which requires to show the data at every click on my different list of icon. The problem is how to display data in to bootstrap modal according to id. Thanks in advance.</p>
  
  <p>Here, I have tried with, but not working all..</p>
  
  <pre><code>       &lt;div class="col-xs-12 col-sm-6 col-md-3"&gt;
  
                  @foreach($Play as $post)
                  &lt;div class="member"&gt;
                      &lt;div class="member-img"&gt;
                          @if ($post-&gt;new_game)
                              &lt;img src="{{ $post-&gt;new_game}}" alt="member" /&gt;@endif
  
                      &lt;/div&gt;
                      &lt;!-- .member-img end --&gt;
                      &lt;div class="member-info"&gt;
                          &lt;h5&gt;{{$post-&gt;friendly}}&lt;/h5&gt;
                          &lt;h6&gt;{{$post-&gt;enemy}}&lt;/h6&gt;
                          &lt;div class="divider--line divider--center"&gt;&lt;/div&gt;
                          &lt;p&gt;{{ $post-&gt;weapon }}&lt;/p&gt;
  
                          &lt;button type="button" class="btn btn--primary btn--link" href="#" data-toggle="modal" data-target="#myModal" id="{{$post-&gt;id }}" onclick="showDtails"&gt;Get more weapon detials&lt;/button&gt;
  
                      &lt;/div&gt;
  
  
                  &lt;/div&gt;
                  @endforeach
  
                  &lt;div id="myModal" class="modal fade" role="dialog"&gt;
                      &lt;div class="modal-dialog"&gt;
  
  
                          &lt;div class="modal-content"&gt;
                              &lt;div class="modal-header"&gt;
                                  &lt;button type="button" class="close" data-dismiss="modal"&gt;&amp;times;&lt;/button&gt;
                                  &lt;h5 class="modal-title" id="myModalLable"&gt;{{$post-&gt;id}}&lt;/h5&gt;
                              &lt;/div&gt;
                              &lt;div class="modal-body"&gt;
                                  &lt;img src="/app/assets/images/team/thumb/1.jpg"&gt;
                                  &lt;p&gt;{{$post-&gt;full_weapon}}&lt;/p&gt;
                              &lt;/div&gt;
  
                          &lt;/div&gt;
  
                      &lt;/div&gt;
                  &lt;/div&gt;
  
              &lt;/div&gt;
  
  
  
          &lt;/div&gt;
  </code></pre>
  
  <p></p>