*/ public function toArray(Request $request): array { return [ 'id' => $this->id, 'amount' => $this->amount, 'status' => $this->status->value, 'status_label' => $this->status->label(), 'gateway' => $this->gateway, 'created_at' => $this->created_at?->toIso8601String(), ]; } }