Try removing the get(), the paginate() does the same thing a get but instead of getting all the records it paginates them.
Aug 7, 2022
6
Level 1
How to get pagination with groupBy in eloquent?
Dear, I have a query like this - return $query->get()->groupBy('date');
It works fine but I want to add pagination on it, while I use- return $query->get()->groupBy('date')->paginate(10) , it does not working. can anyone suggest how to make it okey?
Please or to participate in this conversation.