*/ public function toArray(Request $request): array { $rowService = app(AdminAppTicketRowService::class); $details = $rowService->details($this->resource); return [ ...parent::toArray($request), ...$details, 'allow_refund' => $this->resource->allow_refund(), 'is_active' => $this->resource->is_active(), 'can_cancel' => $this->resource->can_cancel(), 'can_refund' => $this->resource->can_refund(), 'values' => $rowService->values($this->resource, $details), ]; } }