I am having following tables,
- User (id, name)
- category (id, category_name, order)
user_category (id, user_id, category_id)
specialties (id, spe_name)
- user_specialities (id, spe_id, user_id)
I am trying to get all the users with all related specialties order by 'order' in a category where each user has under category in table 'user_category'.
I have tried with relationship 'with' but I am not able to orderby on this query.
Any thoughts where I may wrong?