public function processPaginated(array $pages = [], $perPage = 50, $currentPage = 0)
{
$models = [];
foreach ($pages as $results) {
// Go through each page and process the results into an objects array.
$models = array_merge($models, $this->process($results));
}
$models = $this->processSort($models)->toArray();
return $this->newPaginator($models, $perPage, $currentPage, count($pages));
}