I am working on a simple DataTables page. The DataTable will get the data with an Ajax Call. My DataTables setup (javaScript) is below:
Code:
$("#tblReport").DataTable({
dom: 'Bfrtip',
buttons: [
'copyHtml5',
'excelHtml5',
'pdfHtml5'
],
ajax: {
url: '/reports/ajaxopenwolist',
type: 'POST'
}
}
);
I have a controller class called Reports.php and all my other methods work fine. When I load the datatables, I get a 404 error. However, when I type the same address in my browser, I get the JSON data I expected. I have added the method to the Routes.php file as well.
Does anyone have any ideas?