Пример #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getDish()
 {
     return $this->hasOne(DiaryDish::className(), ['id' => 'dish_id']);
 }
Пример #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getAtes()
 {
     return $this->hasMany(DiaryDish::className(), ['dish_id' => 'id']);
 }