abdulrhmanak / laracart
cart for e-commerce project in laravel
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/abdulrhmanak/laracart
README
Laracart is a cart package designed for Laravel e-commerce projects. This package provides powerful helpers to manage user carts in your e-commerce application.
How to Use:
-
Make sure you have the required migrations for
ProductandUser. -
Install the package using Composer:
composer require abdulrhmanak213/laracart use Abdulrhmanak213\Laracart\Cart;
// Create a new cart instance $cart = new Cart();
// Show the cart for a specific user (by ID or session ID) $cart->show($id);
// Add a new product to the cart $cart->addProduct($product_id, $id, $quantity, $note);
// Remove a product from the cart $cart->removeProduct($product_id, $id);
// Decrease the quantity of a product in the cart $cart->decreaseProduct($product_id, $id);