Open alquialrium opened 11 months ago
i use orderBy id to prevent changing position
i use orderBy id to prevent changing position
How to make this one orderBy
$cartItem = \Cart::session($this->userId)->getContent();
I have a solution to do that, you can also try this way.
$cartItem = \Cart::session($userId)->getContent()->sortKeysDesc();
How can I prevent the items in the cart from changing position when I change the quantity of a product?
I think they are ordered according to the update and put them below, but I don't know where I can modify it.