Multiple Subscriptions
A single billable model can hold multiple independent subscriptions simultaneously via named slots. Each slot is a separate subscription record with its own plan, status, invoices, and gateway subscription ID.When to use multiple slots
- Teams — one subscription for the individual, another for a shared team plan
- Multi-tenant apps — each tenant represented as a separate subscription on the owning user
- Resellers — separate subscription per managed account
- Add-on services — a base plan slot and a separate add-on slot billed independently
Creating subscriptions on named slots
Pass aname option to CreateSubscription:
Accessing a specific slot
Checking subscription state per slot
AllManagesBilling state helpers accept an optional slot name:
Acting on a specific slot
Every action class operates on aSubscription model, so you retrieve the slot first:
Entitlements across multiple slots
TheEntitlements facade aggregates entitlements across all active subscriptions by default. Use for() with a slot name to scope to a specific subscription:
Invoice history per slot
Livewire components with named slots
Pass asubscription-name prop to any subscriber component:
Design considerations
Keep slot names stable. Changing a slot name in code while records in the database use the old name will causesubscription('new_name') to return null. If you need to rename a slot, write a migration to update the name column on the affected subscribd_subscriptions rows.
Consider using an Eloquent model (e.g. Team) as the billable rather than a named slot on User when teams are first-class entities in your domain. This keeps billing directly attached to the team and simplifies multi-tenancy.
Next steps
- Entitlements — Multiple Subscriptions — Aggregating features across slots
- Creating Subscriptions — Subscription creation options
- Livewire Components — Component props and events