You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you have custom sorting and filter classes, and you need to use the with to do something (filtering / sorting) with a relation - only the last one with gets executed.
Now with some dirty hack I'm checking to see if the eager load was set earlier, grab the callback and append it to the newly set eager load.
This seems to be the default behaviour of the Laravel Querybuilder, so it's not a bug or issue of this package. But I stumbled on it within the context of using the package.
I'm interested if someone knows if I'm missing something/doing something wrong.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When you have custom sorting and filter classes, and you need to use the
with
to do something (filtering / sorting) with a relation - only the last onewith
gets executed.For example:
Now with some dirty hack I'm checking to see if the eager load was set earlier, grab the callback and append it to the newly set eager load.
This seems to be the default behaviour of the Laravel Querybuilder, so it's not a bug or issue of this package. But I stumbled on it within the context of using the package.
I'm interested if someone knows if I'm missing something/doing something wrong.
Beta Was this translation helpful? Give feedback.
All reactions