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

        return 'id';
    }