public function actionRemove($id) { ProductCountry::deleteAll(['id' => $id]); return $this->redirect(Url::to(['/shop/country'])); }
/** * @return \yii\db\ActiveQuery */ public function getProductCountry() { return $this->hasOne(ProductCountry::className(), ['id' => 'country_id']); }