Query builder methods on relationships

1
closed
jackhugh
jackhugh
Posted 2 months ago

Query builder methods on relationships #1248

Is there any way to get query builder methods to autocomplete on relationships?

Using vscode, intelephense with ide-helper:models -M

eg

// no error but exists method will not autocomplete
$this->hasMany(Foo::class)->exists();

// in this case the builder method autocompletes as getQuery returns a builder instance
$this->hasMany(Foo::class)->getQuery()->exists();
jackhugh
jackhugh
Created 2 months ago

Premium intelephense seems to have solved the issue.