Recent change introduced in Laravel 7.10.0, and merged from https://github.com/laravel/framework/pull/32624 broke search and pagination functionality when Eloquence is used with group by queries.
Problem with both is that base version of runPaginationCountQuery is changed, and now uses subquery to get count for pagination. This produces multiple rows of aggregates, and the pagination total is returned from first row only.
This can be solved by replacing/removing the method in Sofa\Eloquence\Query\Builder, but then search query gets wrapped in subquery and times out for me, so I couldn't get any further in investigating it.
Recent change introduced in Laravel 7.10.0, and merged from https://github.com/laravel/framework/pull/32624 broke search and pagination functionality when Eloquence is used with group by queries.
Problem with both is that base version of
runPaginationCountQuery
is changed, and now uses subquery to get count for pagination. This produces multiple rows of aggregates, and the pagination total is returned from first row only.This can be solved by replacing/removing the method in Sofa\Eloquence\Query\Builder, but then search query gets wrapped in subquery and times out for me, so I couldn't get any further in investigating it.