/** * Deletes an existing Peoples model. * If deletion is successful, the browser will be redirected to the 'index' page. * @param integer $id * @return mixed */ public function actionDelete($id) { graftsPeoples::deleteAll('peopleId = ' . $id); chronicDiseasesPeoples::deleteAll('peopleId = ' . $id); $this->findModel($id)->delete(); return $this->redirect(['index']); }