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": []
        });

    });
});

Comments

Popular posts from this blog

Deploy laravel application to digital ocean droplet

WP register_post_type() with custom CMB2 meta box

Git post receive setup at server for git push to the production from local machine