/** * Deletes an existing Setting. * If deletion is successful, the browser will be redirected to the 'index' page. * @param integer $id * @return mixed */ public function actionDelete($section) { if (Yii::$app->request->isPost) { Setting::deleteAll('section=:sect', [':sect' => $section]); //$this->findModel($id)->delete(); } return $this->redirect(['index']); }