'any', 'requestData' => [ 'name' => [ 'validation' => DataValidator::length(4), 'error' => ERRORS::INVALID_SETTING ], 'value' => [ 'validation' => DataValidator::length(4), 'error' => ERRORS::INVALID_SETTING ] ] ]; } public function handler() { $setting = Setting::getSetting(Controller::request('name')); if (!$setting->isNull()) { $setting->value = Controller::request('value'); $setting->store(); Response::respondSuccess(); } else { Response::respondError(ERRORS::INVALID_SETTING); } } }