Beispiel #1
0
 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]);
 }
Beispiel #2
0
 public function getBillingAddresses()
 {
     return $this->hasMany(BillingAddress::className(), ['user_id' => 'id']);
 }