public function actionAddress() { $id = Yii::$app->user->identity->id; $billing = BillingAddress::find()->where(['user_id' => $id])->all(); $delivery = DeliveryAddress::find()->where(['user_id' => $id])->all(); return $this->render('address', ['billing' => $billing, 'delivery' => $delivery]); }
public function getBillingAddresses() { return $this->hasMany(BillingAddress::className(), ['user_id' => 'id']); }