Skip to content

Commit 9f4f093

Browse files
committed
Ignore created_at and updated_at timestamps when hydrating db carts/orders
1 parent d838f6e commit 9f4f093

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Cart/Eloquent/Cart.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public static function fromModel(CartModel $model): self
2424
)
2525
->lineItems($model->lineItems->map(function (LineItemModel $model) {
2626
return collect($model->getAttributes())
27-
->except(['order_id', 'data'])
27+
->except(['cart_id', 'data', 'created_at', 'updated_at'])
2828
->merge($model->data)
2929
->all();
3030
}))

src/Orders/Eloquent/Order.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public static function fromModel(OrderModel $model): self
2828
)
2929
->lineItems($model->lineItems->map(function (LineItemModel $model) {
3030
return collect($model->getAttributes())
31-
->except(['order_id', 'data'])
31+
->except(['order_id', 'data', 'created_at', 'updated_at'])
3232
->merge($model->data)
3333
->all();
3434
}))

0 commit comments

Comments
 (0)