maartenpaauw/filament-cashier-billing-provider 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

maartenpaauw/filament-cashier-billing-provider

最新稳定版本:3.0.1

Composer 安装命令:

composer require maartenpaauw/filament-cashier-billing-provider

包简介

Filament billing provider for Laravel Cashier

README 文档

README

Latest Version on Packagist Tests Total Downloads

Integrate Laravel Cashier Stripe support into Filament's multi-tenant panels.

Support me

Model States for Filament

You can support me by buying Model States for Filament.

Installation

  1. Install the package via composer:

    composer require maartenpaauw/filament-cashier-billing-provider
  2. Make sure your Billable model is the same as your Filament tenant model.

Tip

For more information configuring a Billable model, refer to the official Laravel documentation.

Usage

Add plans to your cashier.php config file:

'plans' => [
    'default' => [
        'product_id' => ENV('CASHIER_STRIPE_SUBSCRIPTION_DEFAULT_PRODUCT_ID'),
        'price_id' => ENV('CASHIER_STRIPE_SUBSCRIPTION_DEFAULT_PRICE_ID'),
        'type' => 'default', // Optional, by default it uses the array key as type.
        'trial_days' => 14, // Optional
        'has_generic_trial' => true, // Optional, only `trial_days` OR `has_generic_trial` can be used.
        'allow_promotion_codes' => true, // Optional
        'collect_tax_ids' => true, // Optional
        'metered_price' => true, // Optional
    ],
],

Caution

The current implementation only supports recurring subscriptions.

Add the following code to your AdminPanelProvider (or other panel providers):

use Maartenpaauw\Filament\Cashier\Stripe\BillingProvider;

// ...

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->tenantBillingProvider(new BillingProvider('default'))
        ->requiresTenantSubscription()
        // ...
}

Note

Requiring tenant subscription is optional. You can remove ->requiresTenantSubscription() if you wish.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Upgrading

Please see UPGRADING for more details.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 100
  • Watchers: 1
  • Forks: 10
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 未知

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固