PHP code example of ptuchik / billing

1. Go to this page and download the library: Download ptuchik/billing 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/ */

    

ptuchik / billing example snippets


public function isTester() {
    return false;
}

$plan->prepare($hostable); // Will return plan with all calculations applied for logged in user

$plan->purchase($hostable); // It will do the rest automagically

php artisan vendor:publish --provider="Torann\Currency\CurrencyServiceProvider" --tag=config
php artisan vendor:publish --provider="Ptuchik\Billing\Providers\BillingServiceProvider" --tag=config
php artisan vendor:publish --provider="Ptuchik\CoreUtilities\Providers\CoreUtilitiesServiceProvider" --tag=config