0

I have an integration with laravel datatables with elasticsearch. For the previous versions, this code was solving the issue.

return value(new CollectionEngine(collect($data), new DatatablesRequest()))
    ->setTotalRecords($total)
    ->make‌​(true);

Right now with the new version of datatables (v8) the constructor for collectionEngine has changed and no longer receives a second parameter with the request and the Yajra\DataTables\Request class has be removed as well

Still looking for a solution but with no success on this. How can I make this integration the same way I was doing it before.

Cesar Sosa
  • 13
  • 3

1 Answers1

0

Ok, didn't checked the correctly how the constructor was for the collection engine. This has been changed so it get the app request automatic so no need to be injecting new request to it. Only needs to include ->skipPaging() to the datatable.

$response = value(new CollectionEngine($data))
                ->skipPaging()
                ->make()
Cesar Sosa
  • 13
  • 3