Laravel User Discounts Package
A Laravel 8 package to manage user-level discounts with deterministic stacking, usage caps, and audit logging.
Features
- Assign and revoke discounts to users
- Check discount eligibility
- Apply discounts with stacking and rounding rules
- Enforce per-user usage caps
- Audit discount usage
- Fire events on assign, revoke, and apply
Installation
- Require the package via Composer (local package setup):
composer require adeela/user-discounts
2. If not auto-discovered, add the service provider to config/app.php:
'Adeela\UserDiscounts\UserDiscountsServiceProvider',
3. Publish the configuration (optional):
php artisan vendor:publish --provider="Adeela\UserDiscounts\UserDiscountsServiceProvider" --tag="config"