actionElementId && $this->actionElementId != "diskDataTable") { $this->data['id'] = $this->actionElementId; $this->data['name'] = VmModel::where("id", $this->actionElementId)->value("name"); } } public function update() { } public function delete() { //init proxmox addon params (new AppParams())->initFromWhmcsParams(); //get vm model $vmModel = VmModel::ofHostingId($this->getWhmcsParamByKey('serviceid')) ->ofId($this->formData['id'])->firstOrFail(); //destory vm (new CloudService())->delete($vmModel); return (new HtmlDataJsonResponse()) ->setStatusSuccess() ->setMessageAndTranslate('The Virtual Machine has been deleted successfully'); } }