Closed vatsake closed 1 year ago
Hi @vatsake,
This won't be possible because the query builder methods apply to all models, so we cannot apply type hints to the query builder for specific models.
Unless you know of a creative way to do this of course.
Oh ok. But doesn't Laravel query builder models retain their types?
I don't think so, but I'll check later today to see if they've been able to add them in somehow and use their approach if it works!
Currently
LdapRecord\Models\ActiveDirectory\User
query()->get() returns\LdapRecord\Query\Collection
.But it should return
\LdapRecord\Query\Collection<int, User>
so IDE would autocomplete.