/** * Get results for page * * @param Collection $collection * @param $page * @return array */ private function getPageItems(Collection $collection, $page) { return $collection->slice(($page - 1) * $this->perPage, $this->perPage)->all(); }