$this->id, 'container_reference' => $this->reference, 'container_specification' => ContainerTypes::CONTAINER_SPECIFICATION[$this->container_type], 'container_number' => $this->container_number, 'seal_reference' => $this->seal_reference, 'transport' => new TransportResource($this->transports()->first()), 'packing_lists' => PackingListResource::collection($this->whenLoaded('packingLists', function(){ return $this->packingLists()->whereHas('packages')->get(); })), 'status' => $this->status ]; } }