Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laracart Laravel Package

lukepolo/laracart

Laracart is a flexible shopping cart package for Laravel. It offers a clean API for managing cart items, quantities, prices, attributes, conditions, taxes, and coupons, with support for multiple cart instances, making it easy to add ecommerce cart functionality to any Laravel application.

View on GitHub
Deep Wiki
Context7

Laravel Shopping Cart Package

Frequently asked questions about Laracart
How do I install lukepolo/laracart in a Laravel application?
Install it with composer require lukepolo/laracart, then publish the package config and migrations. Implement the Buyable contract on the model you want to sell, and wire the Cart facade into your storefront. For a straightforward Laravel monolith, a working cart is typically a one- to two-day integration.
What Laravel and PHP versions does Laracart support?
Verify the package's composer constraints and CI matrix before committing, because the evaluation recommends empirical confirmation rather than trusting composer.json alone. The target matrix to confirm is Laravel 10, 11, and 12 with PHP 8.2 and 8.3. If your versions are not actually tested in CI, treat support as unproven.
What is the Buyable contract in Laracart and when should I use it?
Buyable is the contract your sellable models implement so Laracart can wrap them as cart items. It is the cleanest seam in the package and lets you put Product, Variant, or a bundle behind a stable interface. That makes it the main place where portability and future model changes live.
Can Laracart handle multiple separate shopping carts?
Yes, Laracart supports multiple cart instances, which is useful for separate carts or contexts. The session is treated as the primary cart identity, so guest-to-authenticated merge and cross-device continuity are application responsibilities. Plan those flows above the package rather than expecting them as built-in features.
How do taxes, shipping, and discounts work in Laracart?
Taxes, shipping, and discounts are applied through the CartCondition pipeline. Laracart applies conditions but does not adjudicate them, so you must define condition ordering, rounding, and discount stacking rules. Recompute totals server-side at checkout from authoritative pricing.
Does Laracart support coupons?
Laracart's feature set includes coupons as part of its cart adjustments and conditions. Treat coupon validation, eligibility, stacking, and re-validation at checkout as your application logic. Never accept coupon values or totals from the client.
How does Laracart store money, and is it safe for production accounting?
Confirm how Laracart represents money before design freeze, because this family of cart packages has historically used floats rather than integer minor units or a money value object. If that holds here, you take on rounding and reconciliation risk that compounds at refund and reporting time. Retrofitting a money type across a cart is a rewrite, not a refactor.
Is Laracart suitable for API-first or multi-tenant Laravel applications?
Laracart fits a conventional Laravel monolith best, where the session is the natural cart identity and Blade, Livewire, or Inertia handles the front end. It fits poorly with API-first, headless, or multi-tenant designs because the session is the primary cart key. Guest merge, cross-device continuity, and concurrent modification become your problems to solve above the package.
Does Laracart handle orders, payments, inventory, and checkout?
Laracart is a cart primitive, not a commerce platform, so it deliberately does not provide catalog, inventory, orders, payments, fulfillment, or tax jurisdiction logic. You will need to add order persistence, price re-validation at checkout, tax determination, and payment handoff via Cashier or a PSP SDK. Keep the package focused on cart state and put checkout and accounting in your application.
Is Laracart actively maintained, and what is the risk of using it?
The package is MIT, single-maintainer, and has meaningful but not broad adoption at roughly 583 stars, so assume you may need to fork. Release provenance should be checked carefully, including tags, changelog cadence, CI status, and open-issue age. Lock-in is low because the interfaces are thin, which is the strongest argument in its favor.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections