Can someone tell me, I have several model: One Item has many → Properties, On Property has many → Characteristics I can do like this:
return Item::find()->where(['code' => $code])->with('properties')->asArray()->one();
result:
{
title: "Ванна чугунная Ностальжи 150 с ножками",
new: "0",
hit: "0",
recommend: "0",
properties: [
{
//lallala
},
{
//lallala
},
]
}
But i want nested rows (Characteristics) in every property how can i do that much elegant way?