public function actionRemove($id) { if (Yii::$app->request->post()) { $cart = new \common\models\Cart(); $cart->remove($id); $this->redirect(array('cart')); } }