masterix21/laravel-entitlements
A flexible Laravel package for managing feature entitlements, plans, and quotas. Define features, attach them to plans or Eloquent models, then check access, consume limited usage, and control what each user or team can do via a clean, expressive API. Ideal for SaaS feature gating.
type; 1.3.1 makes "one item per type per plan" a database invariant and prevents duplicate type selection in the Filament form. PMs can now treat the plan catalog as authoritative — no ambiguous or double-configured entitlements leaking into pricing pages, quotes, or customer-facing feature matrices.requestRelease() lock-and-recheck, forceRelease() decrementing by usage amount) mean slot_used can be trusted for enforcement, dashboards, and upsell triggers. This is the difference between shipping a seat-based tier and holding it back over "our numbers might be wrong" risk.changePlan() locking, upfront rejection of transitions to empty plans, and downgrade validation against computed usage (including computed types) turn plan changes into a supportable product surface rather than a source of Failed transitions and manual cleanups.TransitionAlreadyResolved surfaced as a notification) let you delegate entitlement operations to support without engineering babysitting or 500s.nextBillingAt() now returns ends_at for non-recurring plans instead of projecting a phantom billing period — keep this package as the entitlement source of truth and keep invoicing elsewhere; don't let it imply recurring billing behavior it doesn't own.Consider it when most of these hold:
plans/features/licenses tables.lang/vendor/laravel-entitlements/ translations path.Look elsewhere or defer when:
entitlement_plan_items (plan_id, type) will fail on dirty data, so existing catalogs need a dedupe pass first.entitlements.models.* honoring across service and strategies, but this remains a package you conform to.changePlan() could double-decrement or leave two pending transitions. Treat 1.3.1 as the minimum viable version for anything customer-visible.For executives: this is a low-cost patch that hardens a package we would otherwise have to build and maintain ourselves — plan catalog, seat entitlements, and self-serve plan changes. 1.3.1 specifically removes correctness risk in concurrency and event timing (the two areas that produce billing-visible bugs and support tickets), adds database-level guardrails instead of relying on UI discipline, and ships AI-assistant guidelines that shorten onboarding. No public API breaks; the upgrade is an ops task, not a rewrite: republish migrations, run them, move customized translations to the vendor path, and validate existing plan data for duplicate item types before migrating.
For engineering: patch release, no deprecations or signature breaks. Changes that require action or review: (1) new migration and unique index — dedupe plan items first, then vendor:publish --tag="entitlements-migrations" and migrate; (2) domain events now fire via DB::afterCommit and are skipped entirely on rollback — audit existing listeners for reliance on in-transaction state or on rollback-time side effects; (3) translations moved to lang/vendor/laravel-entitlements/; (4) filament-badgeable-column pinned to ^4.0, fixing prefer-lowest builds that resolved a Filament 3 release and broke table rendering; (5) entitlements.models.* overrides are now honored consistently, which can change query behavior if overrides were partially effective before. Test suite is at 135 tests / 433 assertions with regressions for each fix. Recommended sequencing: upgrade → validate data → migrate → run suite → verify listeners → confirm admin panel flows (force release, plan delete guards, change plan).
How can I help you explore Laravel packages today?