Tuesday, March 7, 2017

Delete the next $item in cart (laravel crinsane)

I need ability when delete one $item from cart to delete also prevous or the next item...

so :

Cart::remove()

To remove an item for the cart, you'll again need the rowId. This rowId you simply pass to the remove() method and it will remove the item from the cart.

$rowId = 'da39a3ee5e6b4b0d3255bfef95601890afd80709';

Cart::remove($rowId);

this is from documentation.

How I can delete item with $rowId = 'da39a3ee5e6b4b0d3255bfef95601890afd80709'; and the next item with unknown rowID ?



via Andrew

Advertisement