bumbummen99 / LaravelShoppingcart

A simple shopping cart implementation for Laravel
MIT License
505 stars 234 forks source link

When I try to update a value in the options array it will also update the row id. #173

Closed abhishekcodercube closed 2 years ago

abhishekcodercube commented 2 years ago

When I try to update any value from options array it will remove my raw. eg. I have product raw with options and options have key such as "country" => 1 and "total_price" => 5 if I am going update that total_price with another number using update() method then at that time it will remove that product raw.

abhishekcodercube commented 2 years ago

Here is the my code for update ss: https://prnt.sc/fgLwEpx2kN8R

bumbummen99 commented 2 years ago

Yes, as you change your options you have a diffrent position than before. A default car is not the same as a car with options color blue - you can have multiple of the same with different options. Update should return the new row identifier.

bumbummen99 commented 2 years ago

Also please put code into a code tag instead of external websites that might be offline.