承接 laravel-afterburner/subscriptions 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

laravel-afterburner/subscriptions

Composer 安装命令:

composer require laravel-afterburner/subscriptions

包简介

Stripe subscription billing for Afterburner applications

README 文档

README

Stripe subscription billing for Laravel Afterburner Jetstream. Each entity is the billable customer.

Installation

Local Development Setup

For local development, add the package as a path repository:

composer config repositories.afterburner-subscriptions path ../afterburner-subscriptions
composer require laravel-afterburner/subscriptions:@dev

Quick Install

composer require laravel-afterburner/subscriptions
php artisan afterburner:subscriptions:install

Add Afterburner\Subscriptions\Concerns\HasSubscriptions to App\Models\Team.

Register EnsureSubscriptionActive on authenticated web routes (middleware alias: subscription.active).

Documentation

See INSTRUCTIONS.md for the full build specification and host integration checklist.

Features

  • 30-day auto trial on new entities (full product access during trial; no card required)
  • Monthly and annual plans (admin-managed, Stripe-synced)
  • Plan entitlements (limits + feature slugs) via PlanEntitlements / $team->entitlements()
  • SubscriptionEntitlementGate for add-on packages to gate features by plan
  • Promotion codes (admin-managed, Stripe-synced, optional at checkout)
  • Entity subscription manager with Stripe Checkout and billing portal
  • Invoice history via Cashier
  • Hard app block when subscription inactive
  • Billing notification emails to owner, president, and treasurer
  • Audit log entries for subscribe, payment failed, and cancellation (when host AuditService is available)

Entitlement gating for add-on packages

Add-on packages (documents, voting, etc.) should not hard-require this package. Use SubscriptionEntitlementGate at routes, policies, navigation, and mutation points:

use Afterburner\Subscriptions\Support\SubscriptionEntitlementGate;

// Feature slug check (allows during trial, when disabled, or when not installed)
SubscriptionEntitlementGate::allows($team, 'documents');

// Numeric limit check
SubscriptionEntitlementGate::withinLimit($team, 'max_storage_gb', $usedGb);

On teams using HasSubscriptions, convenience methods are also available:

$team->canAccessEntitlement('documents');
$team->withinAccessibleEntitlementLimit('max_storage_gb', $usedGb);

Route middleware (alias registered by this package):

Route::middleware('subscription.entitlement:documents')->group(...);

Laravel gate for policies:

$user->can('teamEntitlement', [$team, 'documents']);

Register each add-on's slug in the host config/afterburner-subscriptions.phpknown_feature_slugs so admins can assign features to plans.

Trial behavior: With trial_full_access enabled (default), entities on a generic trial bypass entitlement checks so they can explore all features. After trial, access is enforced by the subscribed plan.

App-wide block: EnsureSubscriptionActive (host registers) blocks the entire app when billing is inactive. Entitlement checks are per-feature and complementary.

License

MIT License

统计信息

  • 总下载量: 21
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固