ARTICLE AD BOX
<!DOCTYPE html >
<html data-bs-theme="dark">
<head>
<title>Task Details</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.datatables.net/2.3.8/css/dataTables.dataTables.min.css" rel="stylesheet">
<!--
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<script src="https://cdn.datatables.net/2.3.8/js/dataTables.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
-->
<script src="https://cdn.datatables.net/2.3.6/js/dataTables.js"></script>
<script src="https://cdn.datatables.net/buttons/3.2.6/js/dataTables.buttons.js"></script>
<script src="https://cdn.datatables.net/buttons/3.2.6/js/buttons.dataTables.js"></script>
<script src="https://cdn.datatables.net/select/3.1.3/js/dataTables.select.js"></script>
<script src="https://cdn.datatables.net/select/3.1.3/js/select.dataTables.js"></script>
<script src="https://cdn.datatables.net/datetime/1.6.2/js/dataTables.dateTime.min.js"></script>
<script src="https://editor.datatables.net/js/dataTables.editor.js"></script>
<script src="https://editor.datatables.net/js/editor.dataTables.js"></script>
<script src="https://code.jquery.com/jquery-3.7.1.js"></script>
</head>
<body>
<div class="container mt-5">
<h2 class="text-center">Task Details</h2>
<table id="taskTable" class="table table-striped mt-3">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
</table>
<button class="btn btn-secondary mt-3"
onclick="window.location.href='/'">
Back
</button>
</div>
this is my header of data.blade. php
<script> const editor = new DataTable.Editor({ ajax: '/tasks', table: '#taskTable', fields: [ { label: 'ID', name: 'id' }, { label: 'Name', name: 'name' }, { label: 'Done', name: 'done', type: 'checkbox' } ], table: '#taskTable', }) const table = new DataTable('#taskTable',{ ajax: '/tasks', columns:[{ data: 'id'}, {data: 'name'}, {data: 'done', render: d => d ? 'Done' : 'Pending'} ], layout:{ topStart: { buttons:[{extend: 'create', editor: editor}, {extend: 'edit', editor: editor}, {extend: 'remove', editor: editor, formMessage: 'Are you sure you want to delete this task?'} ], } }, select: true }) </script> </body> </html>here is the code when i load the page to get the datas i had error comming like this below picture see
why is this method is not working
https://editor.datatables.net/examples/api/removeMessage i try to do like this but i got the issue which i mention in above picture
