$entities = Entity::searchByQuery($query, $aggregation_criteria, NULL, 36, ($request->get('page', 1) - 1) * 36);
$aggregations = $entities->getAggregations();
$entities = new LengthAwarePaginator($entities, $entities->totalHits(), 36, LengthAwarePaginator::resolveCurrentPage(), array('path' => LengthAwarePaginator::resolveCurrentPath()));
Last active
December 3, 2018 15:26
-
-
Save mohamadaliakbari/62f8d127a1488c89e8bb04ed0dfa0b59 to your computer and use it in GitHub Desktop.
Paginate Elastiquent searchByQuery with getAggregations
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment