public function actionRemove($id) { Yii::$app->response->format = Response::FORMAT_JSON; if (($model = ResourceParam::findOne($id)) !== null) { $model->delete(); return ['id' => $id]; } return []; }