$(function () {
var table = $('#datatablesSimple').DataTable({
processing: true,
serverSide: true,
method: 'get',
ajax: "http://127.0.0.1:8000/api/category",
columns: [
{data: 'DT_RowIndex', name: 'DT_RowIndex'},
{data: 'name', name: 'name'},
{data: 'email', name: 'added_by'},
{data: 'action', name: 'action', orderable: false, searchable: false},
I try calling it using a api in laravel, however I always get a syntax error stating “expected expression, got end of script.”