
<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>