$this->id, 'original_amount' => (double) $this->original_amount, 'original_currency' => new CurrencyResource($this->original_currency), 'amount' => (double) $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, 'transactions' => TransactionResource::collection($this->transactions()->get()), ]; } }