/** * @return \yii\db\ActiveQuery */ public function getKitchen() { return $this->hasOne(Kitchens::className(), ['id' => 'kitchen_id']); }
public function getKitchens() { return $this->hasMany(Kitchens::className(), ['id' => 'kitchen_id'])->viaTable('mr_pvt_places_kitchens', ['place_id' => 'id']); }