*/ public function toArray(Request $request): array { return [ 'id' => $this->id, 'type' => $this->type->value, 'type_label' => $this->type->label(), 'amount' => $this->amount, 'balance_before' => $this->balance_before, 'balance_after' => $this->balance_after, 'description' => $this->description, 'created_at' => $this->created_at?->toIso8601String(), ]; } }