/** * @param int $page * @param int $limit * @return LengthAwarePaginator */ public function getPage($page = 1, $limit = 20) { $result = $this->entry->byPage($page, $limit); return new LengthAwarePaginator($result->items, $result->total, $result->perPage, $result->currentPage); }
/** * @param $id * * @return mixed */ public function getEntry($id) { return $this->entry->find($id); }