public function getStudio() { return $this->hasOne(Studio::className(), ['user_id' => 'id']); }
/** * Получить связанные студии * @return yii\db\ActiveQuery */ public function getStudios() { return $this->hasMany(Studio::className(), ['id' => 'studio_id'])->viaTable('studio_delivery', ['drlivery_id' => 'id']); }