public function paginate($page, $per_page = 50) 
    {
        $this->_builder->limit  = $per_page;
        $this->_builder->offset = ($page - 1) * $per_page;
        $this->page             = $page;
        $this->per_page         = $per_page;

        if (Driver::$pagination_subquery) {
            $this->_builder->limit   = $this->_builder->offset + $per_page;
            $this->_builder->offset  = $this->_builder->offset + 1;
        }
        return $this;
    }
public function paginate($page, $per_page = 50) 
    {
        $this->_builder->limit  = $per_page;
        $this->_builder->offset = ($page - 1) * $per_page;
        $this->page             = $page;
        $this->per_page         = $per_page;

        if (Driver::$pagination_subquery) {
            $this->_builder->limit   = $this->_builder->offset + $per_page;
            $this->_builder->offset  = $this->_builder->offset + 1;
        }
        return $this;
    }
public function paginate ( $ page , $ per_page = 50 ) { $ this -> _builder -> limit = $ per_page ; $ this -> _builder -> offset = ( $ page - 1 ) * $ per_page ; $ this -> page = $ page ; $ this -> per_page = $ per_page ; if ( Driver :: $ pagination_subquery ) { $ this -> _builder -> limit = $ this -> _builder -> offset + $ per_page ; $ this -> _builder -> offset = $ this -> _builder -> offset + 1 ; } return $ this ; }
Return collection pagination page

Example:
echo Person::all()->paginate(1, 25);

@param int $page     current page
@param int $per_page rows per page

@return mixed this object
Return collection pagination page