Standalone CRUD for features. Features exist independently of plans -- create them once, attach them to multiple plans with different values via the Plans resource's Features tab.
List view
Columns:
- Name -- in the current locale
- Slug -- the stable identifier you'll reference in code (
canUseFeature('users'),subscribed:promiddleware, etc.) - Plans count -- how many plans currently use this feature
- Reset cycle -- "Monthly", "Daily", "Never resets" derived from
resettable_period+resettable_interval
Sorting:
- Default by
sort_order
Create / edit form
- Name -- translatable
- Description -- translatable, optional
- Slug -- auto-generated from name if left blank; editable on create, treat as immutable after first attach (changing it breaks every reference in code)
- Reset cycle
resettable_period(number, 0 = never resets)resettable_interval(hour / day / week / month / year)
- Sort order
When to set a reset cycle
| Pattern | resettable_period |
resettable_interval |
|---|---|---|
| API request quota that refills monthly | 1 | month |
| Daily cap (transactional emails, exports) | 1 | day |
| Hard limit on current users / projects (no reset) | 0 | (any) |
| Quarterly | 3 | month |
| Annual | 1 | year |
For "current count" features (users, projects, integrations), use 0 for the period and reduce usage when the resource is removed.
After creating a feature
The feature is created but not attached to anything. Go to the Plans resource, open a plan, switch to the Features tab, and Attach with a per-plan value. Repeat for each plan that should expose the feature.
Deleting
Features use soft deletes. A deleted feature stays out of the resource list and reports false for canUseFeature everywhere it was attached. Restore by editing in the database directly or extending the resource to expose a "trashed" filter.
Contributing
Thanks for your interest in contributing to crumbls/subscriptions-filament.
Local setup
git clone https://github.com/Crumbls/subscriptions-filament.git
cd subscriptions-filament
composer install
To hack on this package alongside the underlying crumbls/subscriptions package, add a path repository to your test app's composer.json:
{
"repositories": [
{ "type": "path", "url": "../subscriptions" },
{ "type": "path", "url": "../subscriptions-filament" }
]
}
Pull requests
- Open the PR against
main. - Breaking changes belong behind a version bump — note them in
CHANGELOG.md. - If the change affects what admins see, include a screenshot or screen recording.
Reporting issues
Open a GitHub issue with:
- Affected version (
composer show crumbls/subscriptions-filament). crumbls/subscriptionsversion.- PHP, Laravel, and Filament versions.
- Steps to reproduce.
- Expected vs. actual behavior.
Security issues
Please do not open public issues for security vulnerabilities. See SECURITY.md for reporting channels.
Contributors
Thank you to everyone who has contributed to this package. Every pull request, bug report, and idea makes a difference.