/** * Fetches the data from the persistent data storage. * * @return array list of data items */ protected function fetchData() { // Get our pagination object $pagination = $this->getPagination(); // Default pagination current page $currentPage = (int) request($pagination->pageVar, 1); // Return an offset array return $this->collection->forPage($currentPage, $pagination->getPageSize())->all(); }