crumbls/subscriptions-filament
Composer 安装命令:
composer require crumbls/subscriptions-filament
包简介
Filament admin panel for crumbls/subscriptions — manage plans, features, and subscriptions.
README 文档
README
A Filament v5 admin panel plugin for crumbls/subscriptions. Manage plans, features, and subscriptions through a complete admin interface.
Requirements
| Package | PHP | Laravel | Filament | crumbls/subscriptions |
|---|---|---|---|---|
2.x |
8.3, 8.4 |
11.x, 12.x, 13.x |
5.x |
^2.0 |
Upgrading from 1.x? See CHANGELOG.md for the breaking changes that came with the crumbls/subscriptions 2.0 bump, and the parent package's UPGRADING.md for the schema migration.
Installation
composer require crumbls/subscriptions-filament
Register the plugin in your Filament panel provider:
use Crumbls\SubscriptionsFilament\SubscriptionsPlugin; public function panel(Panel $panel): Panel { return $panel ->plugins([ SubscriptionsPlugin::make(), ]); }
That's it. The plugin registers all resources automatically.
Note: If you've previously run
php artisan filament:cache-components, you'll need to clear the cache after installing:php artisan filament:cache-componentsOr delete
bootstrap/cache/filament/panels/*.php.
Resources
All resources appear under a Subscriptions navigation group in your admin sidebar.
Plans
Full CRUD for subscription plans.
List view:
- Name, price (formatted with currency), billing cycle, subscriber count, active status
- Filter by active/inactive
- Sortable by display order
- Search by name or slug
Create/Edit form:
- Plan details: name, description (translatable)
- Pricing: price, signup fee, currency (USD/EUR/GBP/CAD/AUD)
- Billing cycle: invoice period + interval
- Status: active toggle, subscriber limit, sort order
- Trial period: collapsible section with period + interval
- Grace period: collapsible section with period + interval
Relation managers:
- Features — Attach existing features to the plan with a per-plan
value(the limit). Create new features inline. Detach features without deleting them. Edit or delete features. - Subscriptions — View all subscriptions for this plan. Create new subscriptions. Delete subscriptions. Status badges (Active, Trial, Grace, Canceled, Ended).
Features
Standalone CRUD for features. Features exist independently of plans and can be attached to multiple plans with different values.
List view:
- Name, slug, number of plans using this feature, reset cycle
- Sortable by display order
Create/Edit form:
- Name, description (translatable), slug (auto-generated)
- Reset cycle: period + interval (set to 0 for running counts like "users")
- Sort order
Subscriptions
Read-only list with management actions.
List view:
- Subscriber type + ID, plan name, slug, start/end dates, status badge
- Status badges: Active (green), Trial (blue), Grace (warning), Canceled (red), Ended (gray)
- Filter by plan
- Search by slug
Inline actions:
- Cancel — Cancel immediately with confirmation dialog
- Renew — Renew an ended (non-canceled) subscription
View page:
- Full subscription details and feature usage breakdown
Feature/Plan Workflow
The key concept: features are defined once, values are set per-plan.
- Create features in the Features resource (e.g. "Users", "API Calls", "SSL")
- Edit a plan → Features tab → Attach a feature
- Set the value for this plan (e.g. "Users" →
10on Basic,50on Pro) - The same feature can have different values across different plans
This is managed through the plan_features pivot table. The attach form prompts for value and sort_order.
Translatable Fields
Plan and feature names/descriptions support multiple locales via spatie/laravel-translatable. The admin forms use the current application locale. To support multiple locales in the admin, consider a locale switcher or filament-spatie-translatable.
Drop-in Relation Manager
The package provides a reusable PlanSubscriptionsRelationManager you can add to any resource whose model uses HasPlanSubscriptions:
use Crumbls\SubscriptionsFilament\RelationManagers\PlanSubscriptionsRelationManager; class TenantResource extends Resource { public static function getRelations(): array { return [ PlanSubscriptionsRelationManager::class, ]; } }
This gives you a full subscriptions tab on the resource with:
- List of all subscriptions with status badges
- Create new subscription (with plan picker)
- Cancel / Renew / Delete inline actions
- Filter by plan
- View subscription details
Works with any model — User, Tenant, Team, Organization — as long as it uses the HasPlanSubscriptions trait.
Customization
All resources resolve model classes from config/subscriptions.php. If you've swapped in custom models, the admin panel uses them automatically — no additional configuration needed.
Extending resources
You can extend any resource class and register your own plugin:
use Crumbls\SubscriptionsFilament\Resources\PlanResource\PlanResource; class CustomPlanResource extends PlanResource { // Add custom columns, filters, actions, etc. }
What's Included
| Resource | Actions | Relation Managers |
|---|---|---|
| Plans | List, Create, Edit, Delete | Features (attach/detach/create/edit/delete), Subscriptions (create/view/delete) |
| Features | List, Create, Edit, Delete | — |
| Subscriptions | List, View, Cancel, Renew | — |
License
MIT
crumbls/subscriptions-filament 适用场景与选型建议
crumbls/subscriptions-filament 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 44 次下载、GitHub Stars 达 3, 最近一次更新时间为 2026 年 02 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「admin」 「subscription」 「laravel」 「filament」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 crumbls/subscriptions-filament 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 crumbls/subscriptions-filament 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 crumbls/subscriptions-filament 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
2lenet/EasyAdminPlusBundle
MaxAl Subscriptions is a flexible plans and subscription management system for Laravel, with the required tools to run your SAAS like services efficiently. It's simple architecture, accompanied by powerful underlying to afford solid platform for your business.
Analysis module for finding problematical shop data.
Rinvex Subscriptions is a flexible plans and subscription management system for Laravel, with the required tools to run your SAAS like services efficiently. It's simple architecture, accompanied by powerful underlying to afford solid platform for your business.
Rinvex Subscriptions is a flexible plans and subscription management system for Laravel, with the required tools to run your SAAS like services efficiently. It's simple architecture, accompanied by powerful underlying to afford solid platform for your business.
Rinvex Subscriptions is a flexible plans and subscription management system for Laravel, with the required tools to run your SAAS like services efficiently. It's simple architecture, accompanied by powerful underlying to afford solid platform for your business.
统计信息
- 总下载量: 44
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 32
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-21