-
-
Notifications
You must be signed in to change notification settings - Fork 856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataTables::make(collection) returns empty array into data property #1987
Comments
Just an empty array and no error on response? The code looks fine. |
@GrimJacky same problem here, did you find a solution? |
Same problem filtering a collection. $collection = Model::all();
//filter
$elements = $elements->filter(function ($appraisal) use ($column, $search) {
if ($column == 'id') {
return match (true) {
($search == 'vp') => $appraisal->video,
str_contains('video', $search) => $appraisal->video,
str_contains('extension', $search) => $appraisal->action->version > 1,
default => str_contains($appraisal->id, $search),
};
}
return false;
});
datatables()
->of($elements)... Everything is working fine. But for some reason when this line is fired But if I call
Don't know the reason but is not painting the table. |
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Is this issue solved for anyone? I am facing the same issue. I am using Redis and feeding data as Array after applying pagination manually. I am geeting data for first page but not for other pages. My issue has been solved with 'skipPaging()'. |
Is not clear why, but it solve my problem too |
this is awesome |
Since paging is being handled before being passed to dataTable, we need to use |
For some reason, this method began to return an empty array, although there is data.
Previously, it was the
of
method. If you replace it - it does not work either.Code snippet of problem
System details
The text was updated successfully, but these errors were encountered: