code: protected function defaultOrder($query)
      {
          if ($this->doesRequireOrdering($query)) {
              $query->orderBy($this->primaryKey);
          }
  
          return $this;
      }
docs: Apply a deterministic order to the page.
  
  @param Builder|Relation $query
  @return $this
  @see https://github.com/cloudcreativity/laravel-json-api/issues/313