public function actionRemove() { if (Yii::$app->request->isAjax) { $data = Yii::$app->request->post(); $hash = $data['hash']; Images::removeByHash($hash); } }