From 63c62f662d0f17c07d260aa376aa83cb133ce9f7 Mon Sep 17 00:00:00 2001 From: Teja Babu S <2662727+mightyteja@users.noreply.github.com> Date: Sun, 3 May 2020 19:16:54 +0530 Subject: [PATCH] options of an item inside the cart, Line 114 to 120 --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index e4dd980..1a0f6de 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,16 @@ $rowId = 'da39a3ee5e6b4b0d3255bfef95601890afd80709'; Cart::update($rowId, 2); // Will update the quantity ``` +If you would like to update options of an item inside the cart, + +```php +$rowId = 'da39a3ee5e6b4b0d3255bfef95601890afd80709'; + +Cart::update($rowId, ['options' => ['size' => 'small']]); // Will update the size option with new value +``` + + + If you want to update more attributes of the item, you can either pass the update method an array or a `Buyable` as the second parameter. This way you can update all information of the item with the given rowId. ```php