1. Go to this page and download the library: Download andriichuk/laravel-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/ */
andriichuk / laravel-billing example snippets
use Andriichuk\LaravelBilling\Concerns\Billable;
class User extends Authenticatable
{
use Billable;
}
use Andriichuk\LaravelBilling\Billing;
Billing::extend('acme', function ($app, array $config) {
return new AcmeBillingDriver(/* provider dependencies */);
});
use Andriichuk\LaravelBilling\Enums\Capability;
if (Billing::driver('acme')->supports(Capability::Refunds)) {
// Resolve the driver and use its SupportsRefunds contract.
}
use Andriichuk\LaravelBilling\Contracts\ResolvesReconciliationBillables;
$this->app->bind(ResolvesReconciliationBillables::class, AccountBillingResolver::class);