PHP code example of kengineering / sonar-api-client
1. Go to this page and download the library: Download kengineering/sonar-api-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/ */
kengineering / sonar-api-client example snippets
// Get all accounts (paginated)
$accounts = Accounts::get();
// Get first account
$first_account = Accounts::first();
// Get accounts with addresses
$accounts_with_addresses = Accounts::query()->addToChild(Address::class);
// Get accounts with status and type
$accounts_with_details = Accounts::query()
->addToChild(AccountStatus::class)
->addToParent(AccountType::class);