/** * Deletes an existing Catalog model. * If deletion is successful, the browser will be redirected to the 'index' page. * @param integer $id * @return mixed */ public function actionDelete($id) { // delete date $date_delete = $this->findModel($id); $id_delete = $date_delete["id_catalog"]; $name_delete = $date_delete['catalog_name']; SearchTable::deleteAll(['name_search' => $name_delete, 'link_search' => $id_delete, 'type_search' => '1']); $this->findModel($id)->delete(); return $this->redirect(['index']); }