New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

offline-agency/laravel-cart

Laravel shopping cart with fiscal support
1,827 2
Install
composer require offline-agency/laravel-cart
Latest Version:4.2.0
PHP:~8.4.0 || ~8.5.0
Laravel:12 · 13
Older releases:5 – 11
License:MIT
Last Updated:Oct 19, 2026
Links: GitHub  ·  Packagist
Maintainer: offlineagency

Laravel Cart

Latest stable release Total downloads CI (main) Code coverage (main)

PHP 8.4 and 8.5 Laravel 12 and 13 PHPStan level max MIT license

A Laravel shopping cart with VAT, row/cart coupons, session or database persistence, API resources and testing helpers. Useful when your application owns its catalog and checkout. For inventory, payments, shipping and order management, evaluate a full commerce framework.

Requires PHP 8.4/8.5, BCMath and Laravel components ^12.69.2 or ^13.32. Latest published tag verified 16 October 2026: 4.1.0. This development branch adds unreleased tax allocation and recipe examples; see the capability/availability map. No next version is assigned.

Composer enforces the exact requirements; PHP prereleases and Laravel 10/11 are excluded.

composer require offline-agency/laravel-cart
use OfflineAgency\LaravelCart\Facades\Cart;

// Prices come from your trusted catalog, never from browser payable amounts.
$item = Cart::add(id: 1, name: 'Widget', qty: 2, price: 10.00, totalPrice: 12.20, vat: 2.20);
Cart::update($item->rowId, ['price' => 20.00]);
Cart::total(); // 48.80

See the maintained v4 docs, executable quick start, full reference, upgrade guide and contributing. The external documentation site is pending alignment with these sources.

Find practical variants/wishlist, Livewire, Inertia, API and Redis-session recipes.

Item coupons apply once per row. The additive, unreleased payableTaxBreakdown() allocates cart discounts into VAT; legacy vatBreakdown() stays before cart coupons. Built-in live mutations stage changes and database operations lock the complete read/modify/write boundary; storage guarantees and custom-driver limits explain their scope. Guest transfer is explicitly enabled; legacy saved snapshots remain a separate mechanism.

Installation and publish tags

Configuration

Usage · Coupons · Storage

Credits and license

Maintained by Offline Agency. Original package credits and contributors are preserved in the expanded reference. Released under the MIT license.

Related Packages

jackiedo/cart

A package used to create and manage carts (such as shopping, recently viewed, co...

55,806 210
dilab/cart

Shopping Cart Library

2,453 6
gloudemans/shoppingcart

Laravel Shoppingcart

763,401 3,698
hardevine/shoppingcart

Laravel Shoppingcart

709,290 356

Version History

Version Released PHP Laravel License
4.2.0 ~8.4.0 || ~8.5.0 ^12.69.2 || ^13.32 MIT
4.1.0 ~8.4.0 || ~8.5.0 ^12.69.2 || ^13.32 MIT
4.0.3 ~8.4.0 || ~8.5.0 ^12.69.2 || ^13.32 MIT
4.0.2 ~8.4.0 || ~8.5.0 ^12.69.2 || ^13.32 MIT
4.0.1 ~8.4.0 || ~8.5.0 ^12.69.2 || ^13.32 MIT