small medium large xlarge

13 Jan 2014, 19:44
Clay Morton (2 posts)

I don’t get the up() and down() methods added to cart which are supposed to replace the change() method. The behavior of my cart worked as desired before doing this; I did drop the database and create a new one before testing the ‘Add to Cart’ button with the quantity column added to line_items.

So I can see how the up() migration would clean up the existing carts that were created before the quantity column was added to line_items, but why do we need the down() method. Isn’t the desired behavior listing the number of products for each product rather than a separate line for each product instance?

You must be logged in to comment