protected function paginateCustom(callable $callback, $limit = Pagination::DEFAULT_LIMIT)
    {
        $this->response->clear();

        return (new Pagination)->paginateOver($callback)->take($limit);
    }
protected function paginateCustom(callable $callback, $limit = Pagination::DEFAULT_LIMIT)
    {
        $this->response->clear();

        return (new Pagination)->paginateOver($callback)->take($limit);
    }
protected function paginateCustom ( callable $ callback , $ limit = Pagination :: DEFAULT_LIMIT ) { $ this -> response -> clear ( ) ; return ( new Pagination ) -> paginateOver ( $ callback ) -> take ( $ limit ) ; }
Accepts callback which should return PaginatedResponse object.

@param callable $callback
@param int $limit
@return Pagination
Accepts callback which should return PaginatedResponse object .