/** * Setup our adapter * * @param Illuminate\Pagination\Paginator $paginator */ public function __construct(Paginator $paginator) { parent::__construct(method_exists($paginator, 'getFactory') ? $paginator->getFactory() : $paginator->getEnvironment(), $paginator->getItems(), $paginator->getTotal(), $paginator->getPerPage()); /** * Pagination contexts need to be setup after we've called our parent * constructor */ $this->setupPaginationContext(); }
public function __construct($items, $perPage, $currentPage = null, array $options = []) { parent::__construct($items, $perPage, $currentPage, $this->mergeOptions($options)); }