src/Pagination/StandardStrategy.php
protected function defaultOrder($query)
    {
        if ($this->doesRequireOrdering($query)) {
            $query->orderBy($this->primaryKey);
        }

        return $this;
    }
protected function defaultOrder($query)
    {
        if ($this->doesRequireOrdering($query)) {
            $query->orderBy($this->primaryKey);
        }

        return $this;
    }
Apply a deterministic order to the page.

@param Builder|Relation $query
@return $this
@see https://github.com/cloudcreativity/laravel-json-api/issues/313