Currently, I am facing an issue while attempting to incorporate a confirmation delete feature using a Bootstrap 4 modal in my Laravel project. The problem arises when the modal is opened, and the submit button fails to function. Upon inspecting the browser, it appears that the closing tag of my form was positioned improperly, right after the opening tag. Despite thorough scrutiny of my code, I am unable to identify the root cause of this discrepancy. Can anyone provide assistance in resolving this perplexing issue?
index.blade.php
<div class="panel-body">
<table id="example" class="table table-striped table-bordered" style="width:100%">
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Address</th>
<th>Blood Group</th>
<th>Type</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@forelse($patients as $patient)
<tr>
<td>{{ $loop-> index + 1 }}</td>
<td>{{ $patient->name }}</td>
<td>{{ $patient->address }}</td>
<td>{{ $patient->blood_group }}</td>
<td>{{ $patient->type_rh }}</td>
<td>
<a href="{{ url('admin/patient/'.$patient->id.'/details') }}" target="_blank">
<i class="fa fa-eye" style="color:#006400"></i>
</a>
<a href="{{ url('admin/patient/'.$patient->id.'/edit') }}">
<i class="fa fa-edit" style="color:#e64980"></i>
</a>
<a href="#" data-toggle="modal" data-target="#deletePatient-{{ $patient->id }}">
<i class="fa fa-trash" style="color:#cc3300"></i>
</a>
<a href="{{ url('admin/patient/pdf/'.$patient->id) }}" class="btn btn-primary pull-right"><i class="fas fa-file-pdf"></i> PDF</a>
</td>
<!-- Delete Modal -->
<div class="modal fade" id="deletePatient-{{ $patient->id }}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel1">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4>Confirm Delete</h4>
</div>
<form action="{{ url('admin/patient/'.$patient->id.'/delete') }}" method="POST">
{{ csrf_field() }}
{{ method_field('DELETE') }}
<div class="modal-body">
<p>Are you sure want to delete this?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger">Delete</button>
</div>
</form>
</div>
</div>
</div>
</tr>
@empty
@endforelse
</tbody>
<tfoot></tfoot>
</table>
</div>