/** * @return \yii\db\ActiveQuery */ public function getCaster() { return $this->hasOne(Caster::className(), ['id' => 'caster_id']); }
/** * @return \yii\db\ActiveQuery */ public function getCasters() { return $this->hasMany(Caster::className(), ['id' => 'caster_id'])->viaTable('{{%video_caster}}', ['video_id' => 'id']); }