I was wondering if it's possibly to order any of the sub-models while lazy eager loading? At the moment I have
Item::findOrFail($id)
->load('sections', 'level', 'category', 'tags', 'relatedItems');
I would like the tags to order by name so I was wondering if something like
Item::findOrFail($id)
->load('sections', 'level', 'category', 'tags', 'relatedItems')
->orderBy('tag.name');
would be possible.
I see other examples on here using 'with' but I can't seem to get that loading with a singular base model.
Thanks