query condition on "with" relation not work #2265
Unanswered
sepisoltani
asked this question in
Q&A
Replies: 1 comment
-
With-> only relations records will be filtered. WhereHas will filter main table's record. |
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.
-
I have a Order Model which has belongsTo relation to Factor model
I want to load orders which only their factor status is 'payed'.
I run this query but it loads all orders.
if I change the "with" , to "whereHas" it works.
why "with" doesn't work ?
Beta Was this translation helpful? Give feedback.
All reactions