[ 'class' => VerbFilter::className(), 'actions' => [ 'delete' => ['POST'], ], ], ]; } public function actionSaveLogs() { if (Yii::$app->request->post()) { $post = Yii::$app->request->bodyParams; $model = new \app\models\FaceLogs(); $model->create($post); Yii::$app->response->format = "json"; return ["stt" => true]; } } public function actionWaitingRecognize() { if (Yii::$app->request->post()) { $post = Yii::$app->request->bodyParams; $model = new \app\models\WaitingReq(); $model->create($post); Yii::$app->response->format = "json"; return ["stt" => true]; } } public function actionSyncUrl() { if (Yii::$app->request->post()) { $post = Yii::$app->request->bodyParams; $sync = \app\models\SyncUrl::find()->one(); if ($sync) { $sync->data = $post['url']; $sync->save(); } else { $model = new \app\models\SyncUrl(); $model->create($post); } Yii::$app->response->format = "json"; return ["stt" => true]; } } }