/** * @return \yii\db\ActiveQuery */ public function getOwner() { return $this->hasOne(Owner::className(), ['id' => 'owner_id']); }
/** * Deletes an existing Owner model. * If deletion is successful, the browser will be redirected to the 'manage' page. * @param integer $id * @return mixed */ public function actionDelete($id) { $this->findModel(Owner::className(), $id)->delete(); return $this->redirect(['manage']); }