Beispiel #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPurchases()
 {
     return $this->hasMany(Purchases::className(), ['id_user' => 'id']);
 }
Beispiel #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getProduct()
 {
     return $this->hasOne(Purchases::className(), ['id' => 'id_product']);
 }