laravel-cursor-paginator icon indicating copy to clipboard operation
laravel-cursor-paginator copied to clipboard

onFirstPage() and hasMorePages() not working as intended

Open janboddez opened this issue 4 years ago • 0 comments

Since next and previous URLs are always provided, I don't think the following methods work as intended:

    public function hasMorePages()
    {
        return $this->meta['next'] != null;
    }

    public function onFirstPage()
    {
        return empty($this->meta['previous']);
    }

These might:

    public function hasMorePages()
    {
        return $this->meta['has_next'];
    }

    public function onFirstPage()
    {
        return ! $this->meta['has_previous'];
    }

janboddez avatar Apr 22 '21 12:04 janboddez