Bug Report: Allowed memory size exhausted while returning a collection datasource #574
Unanswered
BenOussama180
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Hello @BenOussama180 , I believe this is not a bug, because it is not possible to make a pagination using collection causing a lot of slowness when loading the table. A suggestion would be to make a pagination outside the powergrid, using |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Here is a link to the error image : https://flareapp.io/share/NPG6p9nm#F1
Basically i want to remove duplicates from my Link model and from those duplicates i want to only retreive the cheapest one based on price !
My datasource :
public function datasource(): ?Collection { return Link::all() ->groupBy('site') ->map(function ($group) { $sorted = $group->sortBy('price'); return $sorted->first(); }); }
can i achieve the same thing witth a builder?
Beta Was this translation helpful? Give feedback.
All reactions