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

Discounts Laravel Package

astrogoat/discounts

A Laravel package for creating, managing, and applying discounts and promotions. Define percentage or fixed-amount offers, attach them to models or carts, validate codes, and control eligibility with flexible conditions, limits, and expiration rules—keeping pricing logic centralized and reusable.

View on GitHub
Deep Wiki
Context7

A discounts app for Strata. Set tiers of discounts.

Frequently asked questions about Discounts
What is astrogoat/discounts used for?
astrogoat/discounts is a Laravel package for creating, managing, and applying discounts and promotions in Strata applications. It supports percentage and fixed-amount offers, discount codes, eligibility conditions, usage limits, and expiration rules. The goal is to keep pricing logic centralized and reusable instead of scattering discount checks across your codebase.
How do I install astrogoat/discounts in a Laravel app?
Install the package with Composer using composer require astrogoat/discounts. Because it is a Strata discounts app, follow the repository README for any Strata registration, configuration, or migration steps. After installation, define discount tiers and attach discounts to the models or carts where you need them.
Does astrogoat/discounts support percentage and fixed-amount discounts?
Yes. The package is described as supporting percentage offers and fixed-amount offers. That lets you model common promotions such as 20 percent off or a fixed cart discount. You can then combine those offers with codes, conditions, limits, and expiration rules.
Can I attach discounts to Eloquent models or shopping carts?
The package is designed to attach discounts to models or carts. This makes it useful when discounts need to apply to different parts of a Laravel application rather than only one checkout flow. You should review the README for the exact model and cart integration patterns supported by the package.
How do discount codes and validation work in astrogoat/discounts?
astrogoat/discounts includes discount code validation as part of its promotion management features. You define offers and attach eligibility conditions, limits, and expiration rules that determine whether a code can be applied. Your application can then validate a submitted code and apply the resulting discount to the relevant model or cart.
Can I control discount eligibility, usage limits, and expiration?
Yes. The package description highlights flexible conditions, limits, and expiration rules. These controls help you prevent unintended discount stacking, restrict promotions to eligible customers or carts, and stop expired codes from being applied. You should test these rules against your own business requirements before going live.
Is astrogoat/discounts compatible with my Laravel version?
Compatibility depends on the package's Composer requirements, so check its composer.json and README for the supported Laravel and PHP versions. Because it is built for Strata, it is most relevant to Laravel applications using Strata. If you are on an older or very new Laravel release, verify installation and discount behavior in a staging app first.
How should I test discounts in a Laravel application?
Create discounts in your test suite, apply them to model or cart instances, and assert the expected totals. Cover percentage and fixed-amount offers, valid and invalid codes, eligibility conditions, usage limits, and expired promotions. Running these tests in Laravel's testing environment helps catch pricing regressions before they reach production.
What are alternatives to astrogoat/discounts for Laravel promotions?
Alternatives include writing custom discount logic, using broader e-commerce promotion packages, or integrating a dedicated promotions service. astrogoat/discounts is specifically a Strata discounts app, so compare it with options that match your cart and pricing architecture. The main trade-off is tight Strata integration versus more framework-agnostic promotion features.
Is astrogoat/discounts maintained and safe for production?
Check the repository's recent commits, releases, and issue activity to assess maintenance. Since discounts directly affect pricing, test edge cases such as stacking, limits, expired codes, and fixed versus percentage offers before production. Pin the Composer version you validate and monitor updates before deploying changes.
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.
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
youbar/easy-crud
c-point-labs/laravel-hostyourai
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