PHP code example of artisanpack-ui / google-business-profile

1. Go to this page and download the library: Download artisanpack-ui/google-business-profile 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/ */

    

artisanpack-ui / google-business-profile example snippets


namespace ArtisanPackUI\GoogleBusinessProfile\Contracts;

interface TokenProvider
{
    public function accessToken(): string;
}

use Illuminate\Support\Facades\Http;

Http::fake( [
    'mybusinessaccountmanagement.googleapis.com/*' => Http::response( [
        'accounts' => [
            [ 'name' => 'accounts/123', 'accountName' => 'Test Business' ],
        ],
    ] ),
] );

$accounts = app( AccountManagementClient::class )->listAccounts();