public function getPerPage() { return $this->perPage; }
/** * Paginate the given query into a simple paginator. * * @param int $perPage * @param array $columns * @return \Illuminate\Contracts\Pagination\Paginator */ public function simplePaginate($perPage = null, $columns = ['*']) { $page = Paginator::resolveCurrentPage(); $perPage = $perPage ?: $this->model->getPerPage(); $this->skip(($page - 1) * $perPage)->take($perPage + 1); return new Paginator($this->get($columns)->all(), $perPage, $page, ['path' => Paginator::resolveCurrentPath()]); }