mardi 12 juillet 2016
Error datatable with laravel and mysql :DataTables warning: table id=example - ajax error
I'm using datatable in my laravel application. When I have one record everything is well and the data is displayed in the data table but when I have more then two records for example I get this error :
DataTables warning: table id=example - ajax error
Some times its works well but when I refresh the page I get the same error, this is my script:
<script>
$(function() {
$('#example ').DataTable({
processing: true,
serverSide: true,
ajax: '{{ URL::route('ADMIN-AJAX-USERS') }}',
columns: [
{ data: 'companyName', name: 'companyName' },
{ data: 'email', name: 'email' },
{ data: 'companyNum', name: 'companyNum' },
{ data: 'statut', name: 'statut' },
{ data: 'created_at', name: 'created_at' },
{ data: 'action', name: 'action', orderable: false, searchable: false}
]
});
});
</script>
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire