Skip to content
This repository was archived by the owner on Feb 2, 2018. It is now read-only.

Commit 75ceb2f

Browse files
committed
Use data scope for consistency
1 parent dbdea0b commit 75ceb2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/Orders/Http/V1/OrderTransformer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function includeProductFormats(Order $order)
5151
return $this->collection($products, function (Product $product) use ($productFormats) {
5252
$productData = (new ProductTransformer)->transform($product);
5353

54-
$productData['formats'] = $productFormats
54+
$productData['formats'] = ['data' => $productFormats
5555
->filter(function (ProductFormat $format) use ($product) {
5656
return $format->productId == $product->id;
5757
})
@@ -60,7 +60,7 @@ public function includeProductFormats(Order $order)
6060
$formatData['quantity'] = $format->pivot->quantity;
6161

6262
return $formatData;
63-
});
63+
})];
6464

6565
return $productData;
6666
});

0 commit comments

Comments
 (0)