Explorar el Código

fix: update unit name retrieval in FranchiseeContractResource

alvesantos hace 2 semanas
padre
commit
fa4cb51849
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      app/Http/Resources/FranchiseeContractResource.php

+ 1 - 1
app/Http/Resources/FranchiseeContractResource.php

@@ -24,7 +24,7 @@ public function toArray(Request $request): array
         return [
             'id'                           => $this->id,
             'unit_id'                      => $this->unit_id,
-            'unit_name'                    => $this->whenLoaded('unit', fn() => $this->unit->fantasy_name),
+            'unit_name'                    => $this->whenLoaded('unit', fn() => $this->unit->name),
             'protocol'                     => $this->protocol,
             'start_date'                   => $this->start_date?->format('Y-m-d'),
             'end_date'                     => $this->end_date?->format('Y-m-d'),