diff --git a/beike/Shop/Services/CartService.php b/beike/Shop/Services/CartService.php index 86f6798a..27b33de1 100644 --- a/beike/Shop/Services/CartService.php +++ b/beike/Shop/Services/CartService.php @@ -31,6 +31,7 @@ class CartService $cartItems = Cart::query() ->with(['sku.product.description']) ->where('customer_id', $customer->id) + ->orderByDesc('id') ->get(); $cartList = CartList::collection($cartItems)->jsonSerialize(); return $cartList;