src/IMAP/Support/PaginatedCollection.php
public function paginate($per_page = 15, $page = null, $page_name = 'page') {
        $page = $page ?: Paginator::resolveCurrentPage($page_name);

        $results = ($total = $this->count()) ? $this->forPage($page, $per_page) : $this->all();

        return $this->paginator($results, $total, $per_page, $page, [
            'path'      => Paginator::resolveCurrentPath(),
            'pageName'  => $page_name,
        ]);
    }
public function paginate($per_page = 15, $page = null, $page_name = 'page') {
        $page = $page ?: Paginator::resolveCurrentPage($page_name);

        $results = ($total = $this->count()) ? $this->forPage($page, $per_page) : $this->all();

        return $this->paginator($results, $total, $per_page, $page, [
            'path'      => Paginator::resolveCurrentPath(),
            'pageName'  => $page_name,
        ]);
    }
public function paginate ( $ per_page = 15 , $ page = null , $ page_name = 'page' ) { $ page = $ page ? : Paginator :: resolveCurrentPage ( $ page_name ) ; $ results = ( $ total = $ this -> count ( ) ) ? $ this -> forPage ( $ page , $ per_page ) : $ this -> all ( ) ; return $ this -> paginator ( $ results , $ total , $ per_page , $ page , [ 'path' => Paginator :: resolveCurrentPath ( ) , 'pageName' => $ page_name , ] ) ; }
Paginate the current collection.

@param int      $per_page
@param int|null $page
@param string   $page_name

@return LengthAwarePaginator
Paginate the current collection .