/** * @return \yii\db\ActiveQuery */ public function getGallery() { return $this->hasMany(Gallery::className(), ['adver_id' => 'id']); }