PHP code example of hridoyraisul / cartwishlistlaravel
1. Go to this page and download the library: Download hridoyraisul/cartwishlistlaravel 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/ */
hridoyraisul / cartwishlistlaravel example snippets
php artisan optimize
php artisan migrate
protected $cartWishlist;
public function __construct(CartWishlistInterface $cartWishlistInterface)
{
$this->cartWishlist = $cartWishlistInterface;
}
public function example()
{
$user_id = 1; //as example
$this->cartWishlist->getUserCart($user_id);
}
$item = [
'product_id' => 1,
'user_id' => 2
];