How can I load only existing preload data? #3836
Unanswered
positivedeveloper36
asked this question in
Help
Replies: 1 comment 4 replies
-
Hello, ' If not, you can try to use a validator to be sure that this input exist! |
Beta Was this translation helpful? Give feedback.
4 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.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a relation between my category table and my dishes table but when I preload dishes it loads dishes which have empty relation as well
My code like this :
I want only those category which have relation with dishes
I try use whereHas like this :
It works. It success show only those category which have relation with dishes
But is that the best way? Because this uses whereHas and preload together
Beta Was this translation helpful? Give feedback.
All reactions