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

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

marksihor/laravel-cart
======================

Laravel Cart

1.01(5y ago)01.9kMITPHP

Since Aug 13Pushed 5y ago1 watchersCompare

[ Source](https://github.com/marksihor/laravel-cart)[ Packagist](https://packagist.org/packages/marksihor/laravel-cart)[ RSS](/packages/marksihor-laravel-cart/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

laravel-cart
============

[](#laravel-cart)

Installing
----------

[](#installing)

```
$ composer require marksihor/laravel-cart -vvv
```

CONFIGURATION
-------------

[](#configuration)

1. Run the command in your terminal

```
$ php artisan vendor:publish --provider="MarksIhor\\LaravelCart\\CartServiceProvider" --tag=config
```

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

```
  'Cart' => MarksIhor\LaravelCart\Facades\CartFacade::class,
```

3. Open App\\Http\\Kernel.php and add this line to $routeMiddleware array

```
  'cart' => \MarksIhor\LaravelCart\Http\Middleware\CartMiddleware::class,
```

4. Use "cart" middleware on routes you nedd to access cart

### Usage examples

[](#usage-examples)

```
\Cart::addItem([
            'product_id' => $product->id,
            'seller_id' => $product->user_id,
            'attributes' => $attributes,
            'price' => $product->price
        ]);
\Cart::getCart();
\Cart::getCart($cartId);
\Cart::getContentArray();
\Cart::getContentArray($cartId);
\Cart::getContent();
\Cart::getContent($cartId);
\Cart::deleteItem($itemId);
\Cart::clearCart();
\Cart::clearCart($itemId);
\Cart::getTotal($type); // price|total|discount|quantity
\Сart::getTotal($type, $cartId);
\Cart::updateItem($item, $data);
```

License
-------

[](#license)

MIT

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

Every ~4 days

Total

2

Last Release

2145d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/502c6ff875a2fb864db565af2932a45065d754883b6bc3e6819adcc7a326cb22?d=identicon)[marksihor](/maintainers/marksihor)

---

Top Contributors

[![marksihor](https://avatars.githubusercontent.com/u/33258479?v=4)](https://github.com/marksihor "marksihor (13 commits)")

### Embed Badge

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

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

###  Alternatives

[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17878.9k](/packages/markwalet-nova-modal-response)[crumbls/layup

A visual page builder plugin for Filament 5 — Divi-style grid layouts with extensible widgets.

592.6k2](/packages/crumbls-layup)[team-nifty-gmbh/tall-datatables

Server-side rendered datatables for Laravel and Livewire

1320.9k4](/packages/team-nifty-gmbh-tall-datatables)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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