Ejemplo n.º 1
0
 public function actionRemoveAll()
 {
     $items = Yii::$app->request->post('items', []);
     if (!empty($items)) {
         $items = View::find()->where(['in', 'id', $items])->all();
         foreach ($items as $item) {
             $item->delete();
         }
     }
     return $this->redirect(['index']);
 }