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
Coupondiscount

Coupondiscount Laravel Package

codeboxr/coupondiscount

Coupon and discount management for Laravel. Create coupon codes with percentage or fixed discounts, expiry dates, usage limits, and minimum cart rules, then validate and apply them to carts and orders. A simple, lightweight way to add promotional pricing to your store.

View on GitHub
Deep Wiki
Context7

A PHP/Laravel package for coupon and discount

Frequently asked questions about Coupondiscount
How do I install codeboxr/coupondiscount in a Laravel application?
Install it with Composer using composer require codeboxr/coupondiscount, then let Laravel package auto-discovery register the service provider. Publish any config and migrations with php artisan vendor:publish and run php artisan migrate. Before committing, confirm the declared illuminate/* and PHP constraints in composer.json match your app version. Because the package has a single May 2024 release, test installation on a branch first.
Does codeboxr/coupondiscount support percentage and fixed amount coupon discounts?
Yes. The package is built for coupon and discount management and supports percentage or fixed discounts, per its overview. You still need to confirm rounding behavior, currency assumptions, and whether amounts use integer minor units or floats in the source before relying on it for money handling.
Which Laravel and PHP versions does codeboxr/coupondiscount support?
The exact support matrix is defined by the illuminate/* and php constraints in the package's composer.json, so check those first. Given the May 2024 release window, it is most likely aimed at Laravel 10 or 11 on PHP 8.1+, but do not assume. A pinned or narrow constraint range can block your next Laravel major upgrade, so treat it as an upgrade-coupling risk.
Can I configure coupon expiry dates, usage limits, and minimum cart rules?
The package is described as supporting expiry dates, usage limits, and minimum cart rules alongside percentage or fixed discounts. These are the core promotion controls you would expect for cart and order validation. Verify how boundaries are handled, especially expiry at the exact timestamp and whether usage limits count per coupon, per customer, or globally.
Is codeboxr/coupondiscount production-ready for a checkout with real revenue?
Treat it as high blast radius: discounts touch cart totals, tax, orders, refunds, and reporting, so the package becomes a pricing component rather than a small utility. The public adoption signals are thin: around 12 stars, zero dependents, an aggregate score of 0.21, and a single release window. Wrap it behind your own DiscountResolver interface and run it in shadow mode on production traffic before letting it drive real totals. Confirm redemption atomicity and money handling before go-live.
How does codeboxr/coupondiscount handle concurrent coupon redemption and usage limits?
This is the first thing to audit in a spike. Check whether usage-limit decrements use row locks, conditional updates, or transactions, or whether they are read-then-write. Non-atomic counters can over-redeem coupons and cause silent revenue leakage. If the package is weak here, enforce atomicity in your own service with database constraints and transaction boundaries.
Can I stack multiple coupons or define exclusivity rules with codeboxr/coupondiscount?
Composition semantics such as stacking, exclusivity, and precedence are usually where coupon implementations are underspecified. Inspect the public API and schema to see whether multiple coupons per cart are modeled at all or whether one coupon is assumed. If stacking matters to your business, implement precedence rules in your own adapter rather than relying on undocumented behavior.
Does codeboxr/coupondiscount ship routes, controllers, and views or just validation services?
Inspect the vendor directory after installation to see the actual contract surface. If the package ships controllers, routes, and views, it presumes ownership of the checkout discount flow; if it ships only validation and resolution services, it can sit behind an adapter. That distinction drives the whole integration plan, so resolve it in a one-day spike before committing.
How should I test codeboxr/coupondiscount for expiry boundaries, refunds, and coupon reuse?
Write your own feature tests around the adapter you own, not just the package tests. Cover expiry boundary timestamps, usage-limit exhaustion under concurrent requests, partial refunds, negative or zero totals, tax rounding order, and coupon reuse after cancellation. Include database-level tests for unique constraints and transactions if redemption is not clearly atomic.
What are the alternatives if codeboxr/coupondiscount is unmaintained?
Given the low adoption signals and bus-factor-of-one risk, plan a contingency: fork the MIT-licensed code, pin it, and maintain it internally, or model promotions in your own domain layer. Alternatives include building a small coupon service inside your app or using a more actively maintained Laravel commerce or promotion package. Whatever you choose, keep checkout calling your own DiscountResolver interface so you can swap implementations without a rewrite.
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.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect