A simpler way to query relationship columns #46423
Unanswered
mortenscheel
asked this question in
Ideas
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
EDIT: Nevermind,
whereRelation()
basically does the same thing.Hi all.
Wouldn't it be convenient if we could write a query like
like this instead?
I mean, arrow functions have definitely made callbacks easier and cleaner, but for a simple and common use case such as the example, I think a "shortcut" is justified.
Here are a few proof of concept macros for the Eloquent builder:
Are there any issues with this approach? Or am I alone in thinking this would be a super convenient feature?
Beta Was this translation helpful? Give feedback.
All reactions