You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
655 B
24 lines
655 B
|
|
<script>
|
|
let data = [];
|
|
data.forEach(item => {
|
|
const row = document.createElement('tr');
|
|
row.innerHTML = '
|
|
<td>${item.company_name}</td>\
|
|
<td>${item.company_adresse}</td>\
|
|
<td> <button type="submit" class="btn btn-success"> <a href="{{route('company.edit', ${item . id})}}">Edit</a></button><br>\
|
|
<br> </td>\
|
|
|
|
<td>\
|
|
<form action="{{ route("company.destroy", ${item . id}) }}" method="POST">\
|
|
@csrf\
|
|
@method('DELETE')\
|
|
<button type="submit" class="btn btn-danger"\
|
|
onclick="confirm('Are you sure you want to continue?')">Delete</button>\
|
|
</form>\
|
|
</td>\
|
|
|
|
';
|
|
tableBody.appendChild(row);
|
|
});
|
|
</script>
|