1. Go to this page and download the library: Download mohammadv184/laravel-cart library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$product=Product::find(1);
Cart::update(2,$product); // Will update the quantity
$id = 'Biuwla5871';
Cart::update($id, 2); // Will update the quantity
Cart::update(['price' => 1000],"16cdac2cs8"); // Will update the price
$product=Product::find(1);
Cart::update(['id'=>"1c6a4c6a75",'price'=>1000], $product); // Will update the id and price