Open cladon opened 9 years ago
In my controller i convert the array to json with the next result
"{"Result":"OK","Records":[{"id":1,"leerplannummer":"D125\/GHBG125\/lMLKM","ingang":"2015","created_at":"2015-06-08 14:57:54","updated_at":"2015-06-08 14:57:54"},{"id":2,"leerplannummer":"dsfdsds","ingang":"sdsdfsd","created_at":"2015-06-08 14:58:57","updated_at":"2015-06-08 14:58:57"},{"id":3,"leerplannummer":"leerplan 34","ingang":"2015","created_at":"2015-06-08 18:58:51","updated_at":"2015-06-09 20:16:29"}]}"
I have done the next changes in my view
The TypeError stil exist
You need to return the result as JSON.
Try following this example from Eman.
$order = explode(" ", Input::get('jtSorting'));
$data = Users::orderBy($order[0], $order[1])
->take(Input::get('jtPageSize'))
->skip(Input::get('jtStartIndex'));
return Response::json(array(
'Result' => 'OK',
'TotalRecordCount' => $data->count(),
'Records' => $data->get()->toArray()
));
In my controller i have a methode
// return dd($result); // Show the page return view('jtable.index', compact('result'));
In my view i have the next code
......
$(document).ready(function () {
...
Any idea what causes the typeError?