laravel-cursor-paginator
laravel-cursor-paginator copied to clipboard
onFirstPage() and hasMorePages() not working as intended
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'];
}