title: Deleting data from table - Laravel
body: <p>I am trying to create a delete modal box and not with the basic alert with JS. Below, i have placed the modal box in the for loop in the table purposely to delete each entry respectively.. </p>
  
  <p>when i click on the delete link, it doesn't pop up the modal box? Why is this happening? </p>
  
  <pre><code>&lt;table id="myTable" class="table table-xl mb-0"&gt;
    &lt;thead&gt;
      &lt;tr&gt;
        &lt;th&gt;Name&lt;/th&gt;
        &lt;th&gt;File&lt;/th&gt;
        &lt;th&gt;Action&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      @foreach($entries as $entry)
      &lt;tr&gt;
        &lt;td&gt;{{$entry-&gt;id}}&lt;/td&gt;
        &lt;td&gt;{{$entry-&gt;file}}&lt;/td&gt;
        &lt;td&gt;
          &lt;a href="/file/{{$entry-&gt;id}}/checks"&gt;&lt;/a&gt;
          &lt;a href="#deleteModal_{{ $entry-&gt;id }}" data-toggle="modal" data-target="#myModal"&gt;&lt;/a&gt;
  
          &lt;div id="deleteModal_{{ $entry-&gt;id }}" class="modal fade" id="myModal" role="dialog"&gt;
            &lt;div class="modal-dialog"&gt;
  
              &lt;div class="modal-content"&gt;
                &lt;div class="modal-header"&gt;
                &lt;/div&gt;
  
                &lt;div class="modal-body"&gt;
                  &lt;p&gt;Do you wish to delete this {{$entry-&gt;name}} file?&lt;/p&gt;
                &lt;/div&gt;
  
                &lt;div class="modal-footer"&gt;
                  &lt;a href="'/files/{{$entry-&gt;id}}/delete'" class="yes"&gt;Yes&lt;/a&gt;
                  &lt;a data-dismiss="modal" class="no"&gt;No&lt;/a&gt;      
                &lt;/div&gt;
              &lt;/div&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;         
          &lt;/div&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
      @endforeach
    &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>