add container loading date

This commit is contained in:
omair saleh
2021-10-01 17:49:59 +08:00
parent 9b9292546b
commit 9ef636c5d5
2 changed files with 5 additions and 0 deletions
+1
View File
@@ -21,6 +21,7 @@ class ContainerResource extends JsonResource
'container_specification' => ContainerTypes::CONTAINER_SPECIFICATION[$this->container_type],
'container_number' => $this->container_number,
'seal_reference' => $this->seal_reference,
'loading_date' => $this->loading_date ? $this->loading_date->format('d-m-Y') : $this->loading_date,
'transport' => new TransportResource($this->transports()->first()),
'packing_lists' => PackingListResource::collection($this->whenLoaded('packingLists', function(){
return $this->packingLists()->whereHas('packages')->get();