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
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getDeliveryAddresses()
 {
     return $this->hasMany(DeliveryAddress::className(), ['user_id' => 'id']);
 }