src/Pagination/CursorBuilder.php
private function guessKey()
    {
        if ($this->query instanceof EloquentBuilder || $this->query instanceof Relation) {
            return $this->query->getModel()->getRouteKeyName();
        }

        return 'id';
    }
private function guessKey()
    {
        if ($this->query instanceof EloquentBuilder || $this->query instanceof Relation) {
            return $this->query->getModel()->getRouteKeyName();
        }

        return 'id';
    }
Guess the key to use for the cursor.

@return string