Checking Features
Entitlements represent the features a subscriber can access based on their active plan. TheEntitlements facade provides a clean API for checking feature access and limits.
Basic feature check
Checking a limit
When a feature is a numeric limit rather than a boolean, uselimit():
Checking a value
Some features hold a string value rather than a count. Compare them withallows():
Plan feature configuration
Features are declared inconfig/subscribd.php under each plan:
Gate integration
Register a gate for each feature to use Laravel’s built-in@can directive and Gate::allows() calls:
Aborting on missing entitlement
Next steps
- Limits and Usage — Track usage against limits
- Class-Based Features — Type-safe feature checking
- Multiple Subscriptions — Aggregate entitlements across slots