joelwmale/laravel-cart
A simple shopping cart package for Laravel with support for multiple cart instances, quantities, prices, taxes, discounts, and persistent storage. Offers an easy API for adding, updating, and removing items, calculating totals, and managing carts across sessions.
removeInvalidItems() cleanup runs on every cart session load, automatically stripping items missing id, name, or quantity. This is a defensive-data-integrity feature that reduces cart-state bugs reaching checkout — a direct lever on conversion and support-ticket volume.Adopt when:
id, name, quantity, session persistence, single currency, no complex entitlement or bundle logic.Look elsewhere when:
For executives: This release keeps our cart layer on currently supported PHP and Laravel versions and adds automatic cleanup of corrupted cart entries. The business value is fewer broken carts at checkout and fewer support tickets — both conversion-protective. The cost is a mandatory platform upgrade: Laravel 10 and PHP 8.2 are no longer supported, so adopting v2.0.0 requires us to be on Laravel 11+ and PHP 8.3+. That upgrade should be treated as a scheduled dependency of adoption, not an afterthought.
For engineering: v2.0.0 is a breaking release. Minimum PHP moves 8.2 → 8.3; framework support moves to Laravel ^11.0|^12.0|^13.0, dropping Laravel 10; CI now covers PHP 8.3, 8.4, 8.5. New removeInvalidItems() runs on every cart session load and drops items lacking id, name, or quantity. Two asks before we ship: (1) confirm our PHP/Laravel versions and upgrade path, and (2) confirm whether that cleanup is logged or configurable — we want visibility into silently dropped items so we can decide if a user-facing message is warranted.
How can I help you explore Laravel packages today?