update(['client_detail' => $dto->client_detail]); $invoice->items()->delete(); foreach ($dto->items as $item) { $this->attachItemsToInvoice->execute(invoiceId: $invoice->id, item: $item); } return $invoice; }); } catch (\Throwable $th) { info($th->getMessage()); throw new Exception(__('domains/system.exception.something_wrong')); } } }