count(); return self::paginator($this->forPage($page, $pageSize), $total, $pageSize, $page, [ 'path' => Paginator::resolveCurrentPath(), 'pageName' => 'page', ]); } protected static function paginator($items, $total, $perPage, $currentPage, $options) { return Container::getInstance()->makeWith(LengthAwarePaginator::class, compact( 'items', 'total', 'perPage', 'currentPage', 'options' )); } }