groupTransactions); return [ 'id' => $this->id, 'original_amount' => (float) $this->original_amount, 'original_currency' => new CurrencyResource($this->original_currency), 'issuer_name' => $this->issuerCompany->name, 'issuer_id' => $this->issuerCompany->id, 'amount' => (float) $this->amount, 'service_charge' => (float) $this->amount, 'currency' => new CurrencyResource($this->currency), 'created_at' => Carbon::parse($this->created_at)->format('d-m-Y h:i:s A'), 'currency_rate' => (float) $this->currency_rate, 'status' => $this->status, 'status_name' => ApprovalStatus::APPROVAL_STATUS_ID[$this->status], 'payment_method' => $this->payment_method, 'payment_method_name' => ucwords(PaymentMethodType::PAYMENT_METHODS_ID[$this->payment_method]), 'invoices' => GroupTransactionResource::collection($this->groupTransactions), 'reference' => $this->reference, ]; } }