Hello. I have some troubles with lucid models. I have tables like:
id user_id product_name category_id
id product_id model_id price
When i fetch the Products, it returns related values in an order from 5 different tables. So i can’t just order them using Database join queries.
I can order product_name with orderBy(‘product_name’,‘asc’).
How can i order Table Product by price with using only queries ?
Price is at another table as you see at above.
PS: I can do it with using for loops, if conditions.