backend/controllers/ServersController.php
/**
     * Deletes an existing Servers model.
     * If deletion is successful, the browser will be redirected to the 'index' page.
     * @param string $id
     * @return mixed
     */
Deletes an existing Servers model.
If deletion is successful, the browser will be redirected to the 'index' page.
@param string $id
@return mixed
Deletes an existing Servers model . If deletion is successful the browser will be redirected to the ' index ' page . @param string $id @return mixed
public function actionDelete($id)
    {
        $this->findModel($id)->delete();
        if (Yii::$app->getRequest()->isAjax) {
            unset($_GET['id']);
            return $this->getIndexContent('renderPartial');
        }
        return $this->redirect(['index']);
    }
public function actionDelete ( $ id ) { $ this -> findModel ( $ id ) -> delete ( ) ; if ( Yii :: $ app -> getRequest ( ) -> isAjax ) { unset ( $ _GET [ 'id' ] ) ; return $ this -> getIndexContent ( 'renderPartial' ) ; } return $ this -> redirect ( [ 'index' ] ) ; }
Deletes an existing Servers model.
Deletes an existing Servers model .