actionElementId) { return; } $this->data['id'] = $this->actionElementId; $vmModel = VmModel::ofHostingId($this->getWhmcsParamByKey('serviceid')) ->ofId($this->actionElementId)->firstOrFail(); $this->data['name'] = $vmModel->name; $this->api(); $vm = (new VmFactory())->fromVmModel($vmModel); $this->data['description'] = $vm->config()['description']; } public function update() { //get vm model $vmModel = VmModel::ofHostingId($this->getWhmcsParamByKey('serviceid')) ->ofId($this->getFormDataValues()['id'])->firstOrFail(); $this->api(); $vm = (new VmFactory())->fromVmModel($vmModel); //update $vm->updateConfig(['description'=> $this->getFormDataValues()['description'] ]); return (new HtmlDataJsonResponse()) ->setStatusSuccess() ->setMessageAndTranslate('The Template has been updated successfully'); } public function delete() { } }