How can I make query model relation has to many easy to read? #3852
Unanswered
positivedeveloper36
asked this question in
Help
Replies: 1 comment 1 reply
-
What you want is a join and not preloaded relationships. Relationships are always in a tree structure and you need a flat list. Just write a standard join using the Model and it should work. Please share result you get after writing the join |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
My query has to many like this :
If the query run, the result like this ::
I want the result of the model relation query like this ::
So it's easy to use when this api/query is called
I had try query builder and it works. But I want to use the model because it's cleaner
How can I solve this problem?
Please help. Thanks
Additional information ::
If I use query builder like this ::
It works. The result is good
But if I use model like this ::
The
select
from table relation (table products) does not appearBeta Was this translation helpful? Give feedback.
All reactions