I has model A, B, C
model A has relation
public function getBproperty()
{
return $this->hasOne(B::className(), ['id' => 'idB']);
}
so in model ASearch search method i has this join
$query->joinWith(['bproperty']);
so then in index view file of model A, in the grid view data column i just write bproperty.propertyname to get value from model B
Model B has relation
public function getCproperty()
{
return $this->hasOne(C::className(), ['id' => 'idC']);
}
So i want to show model C property value in the view index file of model A. How can i retrieve the value?
I dont know how to write relation of model A to model C.