Eloquent Builder generic annotations #46284
Unanswered
localusercamp
asked this question in
Ideas
Replies: 2 comments
-
++ |
Beta Was this translation helpful? Give feedback.
0 replies
-
Nice catch! 👍🏻
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello.
Some time ago, the framework got generic annotations for collections. This drastically improved type-hinting.
So, why didn't Eloquent Builder get such improvements?
For example in Eloquent Builder class we can add TModel and TCollection templates as following:
firstWhere()
andget()
methods could look something like this then:Beta Was this translation helpful? Give feedback.
All reactions