AJAX Request and Response for Datatable
$(document).ready(function () {
$(function () {
$('#agency-list').DataTable({
processing: true,
serverSide: true,
iDisplayLength: 25,
ajax: {
url: '{{url("agency/get-list")}}',
method: 'POST',
headers: {
'X-CSRF-TOKEN': '{{ csrf_token() }}'
}
},
columns: [
{data: 'rownum', name: 'rownum'},
{data: 'license_no', name: 'license_no'},
{data: 'agency_name', name: 'agency_name'},
{data: 'mobile', name: 'mobile'},
{data: 'license_expire_date', name: 'license_expire_date'},
{data: 'action', name: 'action'}
],
"aaSorting": []
});
});
});
$(function () {
$('#agency-list').DataTable({
processing: true,
serverSide: true,
iDisplayLength: 25,
ajax: {
url: '{{url("agency/get-list")}}',
method: 'POST',
headers: {
'X-CSRF-TOKEN': '{{ csrf_token() }}'
}
},
columns: [
{data: 'rownum', name: 'rownum'},
{data: 'license_no', name: 'license_no'},
{data: 'agency_name', name: 'agency_name'},
{data: 'mobile', name: 'mobile'},
{data: 'license_expire_date', name: 'license_expire_date'},
{data: 'action', name: 'action'}
],
"aaSorting": []
});
});
});
Comments
Post a Comment