diff --git a/app/Http/Resources/PackageResource.php b/app/Http/Resources/PackageResource.php index 2f33b13e..44e25945 100644 --- a/app/Http/Resources/PackageResource.php +++ b/app/Http/Resources/PackageResource.php @@ -17,7 +17,7 @@ class PackageResource extends JsonResource public function toArray($request) { - $originalPackingList = $this->packingList->owner instanceof PackingList ? $this->packingList->owner : $this->packingList; + $originalPackingList = $this->packingList->owner instanceof PackingList ? $this->packingList->owner->owner : $this->packingList->owner; return [ 'id' => $this->id,