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

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

feraandrei1/cart
================

Cart package

v5.0.0(1y ago)03MITPHPPHP ^8.0

Since Dec 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/feraandrei1/cart)[ Packagist](https://packagist.org/packages/feraandrei1/cart)[ Docs](https://github.com/feraandrei1/cart)[ RSS](/packages/feraandrei1-cart/feed)WikiDiscussions main Synced 1mo ago

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

Laravel Cart Package (private)
==============================

[](#laravel-cart-package-private)

This is a package that can be easily plugged into our current Laravel projects that require cart functionality.

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

[](#installation)

You can install the package via composer:

```
composer require feraandrei1/cart
```

### Migrate and publish the config files

[](#migrate-and-publish-the-config-files)

```
php artisan vendor:publish --provider="Feraandrei1\Cart\CartServiceProvider"
```

### Run the migration

[](#run-the-migration)

```
php artisan migrate
```

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

[](#configuration)

The package has a configuration file that needs to be edited before it'll be fully functional.

Usage
-----

[](#usage)

Note the **$product** needs to be a package named eloquent.

### Add a product to the cart

[](#add-a-product-to-the-cart)

```
cart()->add($product, $quantity, $source);
```

`$product` needs to be an Eloquent model. The quantity needs to be integer and the source is really optional.

### Remove a product from the cart

[](#remove-a-product-from-the-cart)

```
cart()->remove($product);
```

`$product` needs to be an Eloquent model.

### Get the cart items.

[](#get-the-cart-items)

```
cart()->getCart();
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Andrei Feraru](https://github.com/feraandrei1)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance43

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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 ~27 days

Total

4

Last Release

449d ago

Major Versions

v2.0.0 → v3.0.02025-02-18

v3.0.0 → v4.0.02025-02-22

v4.0.0 → v5.0.02025-02-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/2df3200f10e66a60682f2ab863e29b47f550feefed6b392cae76fa6f9a66c1ce?d=identicon)[feraandrei1](/maintainers/feraandrei1)

---

Top Contributors

[![feraandrei1](https://avatars.githubusercontent.com/u/105398957?v=4)](https://github.com/feraandrei1 "feraandrei1 (9 commits)")

---

Tags

cartferaandrei1

### Embed Badge

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

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

###  Alternatives

[wearepixel/laravel-cart

A cart implementation for Laravel

1310.5k](/packages/wearepixel-laravel-cart)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[ultrono/laravelshoppingcart-1

Laravel 11 and above Shopping cart

1110.0k](/packages/ultrono-laravelshoppingcart-1)

PHPackages © 2026

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