PHP code example of maartenpaauw / filament-cashier-billing-provider

1. Go to this page and download the library: Download maartenpaauw/filament-cashier-billing-provider library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

maartenpaauw / filament-cashier-billing-provider example snippets


'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
    ],
],

use Maartenpaauw\Filament\Cashier\Stripe\BillingProvider;

// ...

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