PHPackages                             abstracteverything/cart - 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. abstracteverything/cart

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

abstracteverything/cart
=======================

Cart session manager

v1.0.0(9y ago)018MITPHPPHP &gt;=5.6.4

Since Jun 2Pushed 9y ago1 watchersCompare

[ Source](https://github.com/AbstractEverything/cart)[ Packagist](https://packagist.org/packages/abstracteverything/cart)[ RSS](/packages/abstracteverything-cart/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (5)Versions (2)Used By (0)

Cart management for Laravel
===========================

[](#cart-management-for-laravel)

Manage cart items using sessions.

Install
-------

[](#install)

Run `composer require abstracteverything/cart` or add:

```
{
    "require": {
        "abstracteverything/cart": "dev-master"
    }
}

```

to your composer.json file and run `composer update`.

Add `AbstractEverything\Cart\CartServiceProvider` to your providers array.

Export the config file using `php artisan vendor:publish`.

Usage
-----

[](#usage)

```
// Add cart items:

$cart->add(123abc, 'Grapes', 12.50, 2, [
    'variety' => 'green',
    'type' => 'seedless',
]);

// Add more than one item to the cart

$cart->addMany([
    [
        'id' => 'item1',
        'name' => 'Test item 1',
        'price' => 123,
        'quantity' => 1,
        'options' => [],
    ],
    [
        'id' => 'item2',
        'name' => 'Test item 2',
        'price' => 234,
        'quantity' => 2,
        'options' => [],
    ],
]);

// Find cart item by its id:

$cart->find(123abc);

// Get all the items in the cart:

$cart->all();

// Calculate total price of all items:

$cart->subtotal();

// Calculate the total tax of all items:

$cart->tax();

// Calculate total price with tax of all items:

$cart->subtotalWithTax();

// Remove an item by its id:

$cart->remove(123);

// Count the number of items in the cart:

$cart->count();

// Remove all items from the cart:

$cart->clear();

```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3316d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/14864399?v=4)[rfcam84](/maintainers/AbstractEverything)[@AbstractEverything](https://github.com/AbstractEverything)

---

Top Contributors

[![AbstractEverything](https://avatars.githubusercontent.com/u/14864399?v=4)](https://github.com/AbstractEverything "AbstractEverything (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/abstracteverything-cart/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[illuminate/http

The Illuminate Http package.

11937.9M6.8k](/packages/illuminate-http)[illuminate/routing

The Illuminate Routing package.

1419.2M2.9k](/packages/illuminate-routing)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9349.2M276](/packages/illuminate-pipeline)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)

PHPackages © 2026

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