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

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

ricadesign/laravel-cart
=======================

Laravel shopping Cart

v1.6.1(6mo ago)0308[1 issues](https://github.com/Ricadesign/laravel-cart/issues)[1 PRs](https://github.com/Ricadesign/laravel-cart/pulls)MITPHPPHP ^7.1.3|^8.0CI passing

Since May 11Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/Ricadesign/laravel-cart)[ Packagist](https://packagist.org/packages/ricadesign/laravel-cart)[ RSS](/packages/ricadesign-laravel-cart/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (4)Versions (25)Used By (0)

Laravel Cart Package
====================

[](#laravel-cart-package)

Welcome to the Laravel Cart Package! This package provides a complete solution for adding cart functionality to your Laravel application. It also includes pre-configured endpoints so you can consume the cart quickly and easily.

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

[](#installation)

You can install this package using Composer. Run the following command in your terminal:

```
composer require ricadesign/laravel-cart

```

You can publish the package configurations (useful if you plan to have full control), run the following command:

```
php artisan vendor:publish --provider="Darryldecode\Cart\CartServiceProvider\LaravelCart\CartServiceProvider" --tag="config"
php artisan vendor:publish --provider="Ricadesign\LaravelCart\LaravelCartServiceProvider" --tag="config"

```

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

[](#configuration)

By default, the cart is stored in the user's session. However, if you want to change this configuration to store the cart in the database, you need to add the following line to the `config/shopping_cart.php` configuration file:

```
'storage' => 'Ricadesign\LaravelCart\DBStorage',
```

After configure storage, you must run:

```
php artisan migrate

```

In case you are using DBStorage, you can configure the number of days you want to remain the cart on database in `config/laravel-cart.php` configuration file:

```
'prunable_days' => 14,
```

In order to clear periodically the database\_carts table you can include this line in schedule:

```
$schedule->command('model:prune', [
            '--model' => [DatabaseStorageModel::class],
        ])->daily();
```

Endpoints
---------

[](#endpoints)

This package includes a set of pre-configured endpoints that allow you to manage the cart quickly and easily. The endpoints are protected by default authentication, so only authenticated users can perform actions on the cart.

- `GET /api/cart`: returns the contents of the cart.
- `POST /api/cart`: adds a product to the cart. The request body must include the product `id`, `name`, `price`, `quantity` and optionally an array of options.
- `PUT /api/cart`: updates the quantity of a product in the cart.
- `PUT /api/cart/increment`: updates the quantity of a product in the cart.
- `DELETE /api/cart`: removes a product from the cart.

Contributions
-------------

[](#contributions)

If you want to contribute to this package, you can fork the repository on GitHub and send a pull request with your changes. We also appreciate you reporting any issues or bugs you find in the issues section of the repository.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance66

Regular maintenance activity

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 55.8% 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 ~99 days

Recently: every ~227 days

Total

21

Last Release

205d ago

Major Versions

v0.2.0 → 1.0.02021-01-07

PHP version history (4 changes)v0.1.0PHP ^7.1.3

v1.1.0PHP ^7.1.3 || ^8.0

v1.1.1PHP ^7.1.3 | ^8.0

v1.1.2PHP ^7.1.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/26688392d136adb39794523162938f4f3d1f9c08ba69aef8e79cb8ebfa3e57ae?d=identicon)[Payetus](/maintainers/Payetus)

---

Top Contributors

[![Payetus](https://avatars.githubusercontent.com/u/3797659?v=4)](https://github.com/Payetus "Payetus (24 commits)")[![jperez8](https://avatars.githubusercontent.com/u/48395571?v=4)](https://github.com/jperez8 "jperez8 (19 commits)")

### Embed Badge

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

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

###  Alternatives

[blair2004/nexopos

The Free Modern Point Of Sale System build with Laravel, TailwindCSS and Vue.js.

1.2k2.3k](/packages/blair2004-nexopos)

PHPackages © 2026

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