PHP code example of labrodev / laravel-team-paddle

1. Go to this page and download the library: Download labrodev/laravel-team-paddle 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/ */

    

labrodev / laravel-team-paddle example snippets


'team_model' => Labrodev\TeamPaddle\Models\BillableTeam::class,

'prices' => [
    'pro' => env('PADDLE_PRICE_PRO'),
],

'subscription_type' => 'default',

final readonly class TeamPlanSynced
{
    public function __construct(
        public Team $team,
        public PlanContract $previousPlan,
        public PlanContract $newPlan,
    ) {}
}

Event::listen(TeamPlanSynced::class, NotifyOwnerOfPlanChange::class);
bash
php artisan vendor:publish --tag="cashier-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="team-paddle-config"