fix vt packing list api

This commit is contained in:
omair saleh
2022-07-18 14:41:46 +08:00
parent f62fc48636
commit 92b463b78e
+1 -1
View File
@@ -30,7 +30,7 @@ class ContainerResource extends JsonResource
'remarks' => RemarkResource::collection($this->remarks),
'status' => $this->status,
'packing_lists' => $this->whenLoaded('packingLists', PackingListResource::collection($this->whenLoaded('packingLists', function(){
return $this->packingLists()->whereHas('packages')->get()->sortBy(function ($packingList) {
return $this->packingLists()->get()->sortBy(function ($packingList) {
return $packingList->owner->company_module_id;
});
})))