1. Go to this page and download the library: Download artisan-build/bfc-client 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/ */
artisan-build / bfc-client example snippets
use ArtisanBuild\BfcClient\BfcHttp;
BfcHttp::withClientIdentity()
->withToken($credential)
->post('https://provider.example/api/things', $payload);
use ArtisanBuild\BfcClient\BfcHttp;
use Illuminate\Http\Client\Request;
BfcHttp::factory()->fake();
BfcHttp::factory()->assertSent(fn (Request $request): bool => $request->url() === 'https://provider.example/api/things');
use ArtisanBuild\BfcClient\Install\InstallFiles;
$result = (new InstallFiles)->install(
environmentPath: '/absolute/path/.env.source',
composerPath: '/absolute/path/composer.json',
environment: ['SOURCE_CREDENTIAL' => $credential],
composerMajors: ['vendor/source-client' => 2],
);
$result->succeeded();
$result->stages(); // Values are only "unchanged", "replaced", or "failed".