[ 'class' => VerbFilter::className(), 'actions' => [ 'delete' => ['POST'], ], ], ]; } /** * Lists all AfterSale models. * @return mixed */ public function actionCustomMenu() { $config = Config::find()->one(); if (Yii::$app->request->isPost) { Yii::$app->response->format = 'json'; $data = Yii::$app->request->post('data'); } return $this->render('custom_menu', [ 'customPageList' => [], 'data' => $config->menu_setting ?: '[]' ]); } }