src/Collection/ArrayCollection.php
public function page(int $page, int $perPage): ArrayCollection
    {
        return $this->slice(($page - 1) * $perPage, $perPage);
    }
public function page(int $page, int $perPage): ArrayCollection
    {
        return $this->slice(($page - 1) * $perPage, $perPage);
    }
public function page ( int $ page , int $ perPage ) : ArrayCollection { return $ this -> slice ( ( $ page - 1 ) * $ perPage , $ perPage ) ; }
Creates a paginated collection

@param int $page    The page number
@param int $perPage The number of items per page

@return ArrayCollection
Creates a paginated collection