PHPackages                             anwar7736/shoppingcart - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. anwar7736/shoppingcart

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

anwar7736/shoppingcart
======================

Make a simple shopping cart package by using laravel

01PHP

Since Jun 3Pushed 2y ago1 watchersCompare

[ Source](https://github.com/anwar7736/laravel-simple-shopping-cart-package)[ Packagist](https://packagist.org/packages/anwar7736/shoppingcart)[ RSS](/packages/anwar7736-shoppingcart/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

What is this package?
---------------------

[](#what-is-this-package)

This is a laravel simple shopping cart package. You can use this package very easily. Please follow these instructions for use this package.

Installation
------------

[](#installation)

```
composer require anwar7736/shoppingcart
```

---

Configuration
-------------

[](#configuration)

1. Open **config/app.php** and add this line to your Service Providers Array.

```
Anwar\ShoppingCart\ShoppingCartServiceProvider::class
```

2. Open **config/app.php** and add this line to your Aliases

```
'Cart' => Anwar\ShoppingCart\Facades\Cart::class
```

3. **Optional configuration** file (useful if you plan to have full control)

```
php artisan vendor:publish --provider="Anwar\ShoppingCart\ShoppingCartServiceProvider"
```

---

How to use
----------

[](#how-to-use)

```
use Anwar\ShoppingCart\Facades\Cart;

//Add single item to cart
Cart::add(id, name, quantity, price, discount(optional), variation(optional), image(optional));

//Get single item from cart
Cart::get(id);

//Update single item from cart(you can update quantity or variation or both)
Cart::update(id, quantity(optional), variation(optional));

//Remove single item from cart
Cart::remove(id);

//Get how many items in your cart
Cart::count();

//Get all cart items
Cart::content();

//Get total discount amount in your cart
Cart::discount();

//Get subtotal in your cart
Cart::subtotal();

//Remove all items from your cart
Cart::destroy();
```

---

 Thank You
-----------

[](#-thank-you-)

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5dd046e863b001e21af1cb792b2bcbe73604ae0448d8f2c1c9414e6a30b7cc2e?d=identicon)[anwar7736](/maintainers/anwar7736)

---

Top Contributors

[![anwar7736](https://avatars.githubusercontent.com/u/78712716?v=4)](https://github.com/anwar7736 "anwar7736 (2 commits)")

### Embed Badge

![Health badge](/badges/anwar7736-shoppingcart/health.svg)

```
[![Health](https://phpackages.com/badges/anwar7736-shoppingcart/health.svg)](https://phpackages.com/packages/anwar7736-shoppingcart)
```

###  Alternatives

[phpro/soap-client

A general purpose SoapClient library

8885.6M46](/packages/phpro-soap-client)[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5205.3M82](/packages/symplify-monorepo-builder)[typo3/cms-reports

TYPO3 CMS Reports - Show status reports and installed services in the (System&gt;Reports) backend module.

137.1M58](/packages/typo3-cms-reports)[lcharette/uf_formgenerator

Form generator for UserFrosting V5

178.7k3](/packages/lcharette-uf-formgenerator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
