I am using Laravel for this, all other things and functions work properly. Datatable call in other functions work properly but in this function it throws
count(): Parameter must be an array or an object that implements Countable
Code is as following
$clicks=History::orderBy('id','DESC');
return DataTables::of($clicks)->make(true);
Does anyone know why is it happening?
That error isn't from DataTables, I'm afraid - I did a search for "Countable" on the code and there's no match - so it must be something else triggering it in your stack.
Colin
It'll be the Laravel integration, so at least a layer above DataTables. It would be worth looking on SO, there are a few threads with that error, for example here.
Colin
DataTables designed and created by SpryMedia Ltd.
© 2007-2023 MIT licensed. Privacy policy. Supporters.