1. Go to this page and download the library: Download lenius/laravel-basket 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/ */
lenius / laravel-basket example snippets
//Format array of 'id' => 1,
'name' => 'Dog',
'price' => 120.00,
'quantity' => 1,
'weight' => 200
);
//Make the insert...
Basket::insert(new Item($items));
//Let's see what we have got in their...
dd(Basket::totalItems());