public function actionBatchDelete()
    {
        if (($ids = Yii::$app->request->post('ids')) !== null) {
            $models = $this->findModel($ids);
            foreach ($models as $model) {
                $model->delete();
            }
            return $this->redirect(['index']);
        } else {
            throw new HttpException(400);
        }
    }
public function actionBatchDelete()
    {
        if (($ids = Yii::$app->request->post('ids')) !== null) {
            $models = $this->findModel($ids);
            foreach ($models as $model) {
                $model->delete();
            }
            return $this->redirect(['index']);
        } else {
            throw new HttpException(400);
        }
    }
public function actionBatchDelete ( ) { if ( ( $ ids = Yii :: $ app -> request -> post ( 'ids' ) ) !== null ) { $ models = $ this -> findModel ( $ ids ) ; foreach ( $ models as $ model ) { $ model -> delete ( ) ; } return $ this -> redirect ( [ 'index' ] ) ; } else { throw new HttpException ( 400 ) ; } }
Delete multiple models page.

@return mixed
@throws \yii\web\HttpException
Delete multiple models page .