spatie/tax-calculator
Interfaces and helpers to simplify tax calculations in PHP. Use TaxCalculation with plain numbers or items implementing HasTax to compute base, tax, and total prices, and combine calculations (e.g., cart items + delivery) on the fly.
For Executives: "This package lets us standardize tax calculations globally—reducing errors, compliance risks, and dev time. For example, expanding to the EU or adding state taxes in the US becomes a config change, not a months-long build. It’s MIT-licensed, battle-tested by Spatie (a trusted open-source agency), and integrates seamlessly with Laravel. The trade-off? Minimal upfront cost for a scalable, auditable solution."
For Engineering:
*"Spatie’s tax-calculator gives us a clean, interface-driven way to handle taxes:
HasTax) enforce consistency across items (e.g., cart products, subscriptions).basePrice(), taxPrice(), and taxedPrice() simplify calculations—no more spaghetti math in checkout logic.TaxRule without modifying core code.How can I help you explore Laravel packages today?