/** * Get a new paginator instance. * * @param array $items * @param integer $total * @param integer $perPage * @return \DeSmart\Pagination\Paginator */ public function make(array $items, $total, $perPage = null) { $paginator = new Paginator($this, $items, $total, $perPage); $paginator->setUrlGenerator($this->urlGenerator); $paginator->setRouter($this->router); return $paginator->setupPaginationContext(); }