- What is renoki-co/cashier-register used for in Laravel?
- Cashier Register is a Laravel package that extends Laravel Cashier for Stripe with plan and feature management. It lets you define subscription tiers, gate features, enforce per-plan quota limits, and track feature usage for SaaS billing flows. It is aimed at applications that already use Cashier-style subscriptions and need quota enforcement.
- How do I install cashier-register with Composer?
- Install it as a Composer dependency with composer require renoki-co/cashier-register. After installation, follow the package README for any required configuration or migration publishing steps. Then wire your plans, features, and quota limits into your subscription flow.
- Which Laravel, PHP, and Cashier versions does cashier-register support?
- The provided context does not list exact version constraints for PHP, Laravel, or Laravel Cashier. Check the package composer.json and README before upgrading, especially if you are on an older Laravel or Cashier release. Validate compatibility in a branch because quota behavior is business-critical.
- How do I define plans and features with cashier-register?
- Cashier Register provides plan and feature management on top of Laravel Cashier so you can describe subscription tiers and the features they include. You define the plans and features in your application configuration or billing setup, then use them to gate access and enforce limits. Consult the README for the exact configuration format and available APIs.
- How do I enforce per-plan quota limits in a Laravel app?
- You define quota limits per plan and feature, then check or increment usage through the package quota tracking APIs. Over-quota increments should be blocked or handled according to your plan rules. Add application tests to confirm that each plan enforces the expected limits.
- What does getTotalUsedQuota() do in cashier-register 6.0.2?
- getTotalUsedQuota() is an additive read helper introduced in 6.0.2 that returns the total used quota for a feature. It is useful for admin dashboards, customer-facing usage views, and support tooling. Because it is a read helper, it is low risk compared with changes to quota increment logic.
- What changed in cashier-register version 6.0.2?
- Version 6.0.2 is a patch release that fixes a double-increment bug for over-quota usage and adds the getTotalUsedQuota() read helper. The fix is behaviorally important because it prevents future over-quota usage from being counted twice. It is not described as an architectural change.
- Does the 6.0.2 double-increment fix repair historical used_total data?
- The context indicates the fix prevents future over-quota usage from being counted twice, but it may not repair historical used_total values already inflated by the bug. You should audit existing quota records before rollout and plan a reconciliation or baseline reset if needed. Do not assume the patch will backfill or correct legacy data.
- Is cashier-register safe for production quota accounting?
- It can be suitable for Laravel applications that need subscription quota tracking, but quota accounting is business-critical and requires validation. Review concurrency behavior for incremental increments, confirm whether used_total is the source of truth or cached, and monitor for abnormal quota deltas. Stage the upgrade with production-like data before broad rollout.
- How should I test a cashier-register upgrade in my Laravel application?
- Upgrade to 6.0.2 in a branch, run your application and package test suites, and add regression tests for over-quota increments and getTotalUsedQuota(). Then validate in staging with representative subscription and feature data, including auditing existing used_total records. Deploy behind monitoring and reconcile legacy quota values if historical inflation is found.