Using ?expand=relationName I can enfroce a RESTfull api view to contain related model data.
But how to ensure related models of this related model to be nested in the second trier?
USER -> ORDERS -> ORDER’s ITEMS
in a single (nested) view!
Thanks ahead of your kind feedback!
I am sure you can use
expand=relationName.subRelation but i am not sure if you have to preload the given relation with
return new ActiveDataProvider([
'query' => User::find()->with(['orders.orderItems']),
So you might try also just
['orders'] without the sub relation.
Sweet - thank you so much !!!