1. Go to this page and download the library: Download otago/crm library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?phprequire_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
otago / crm example snippets
useOP\CRM;
// Step 1: Define the operations
$operations = [
[
'method' => 'DELETE',
'url' => "/Lead(LeadID=3)",
],
[
'method' => 'POST',
'url' => "/Lead",
'data' => [
"FirstName" => "John",
"LastName" => "Doe",
"Email" => "john.doe@example.com",
"Phone" => "123-456-7890",
],
],
];
// Step 2: Send the batch request
$response = CRM::sendBatchRequest($operations);
// Step 3: Optionally Handle the Fibre. If you want to check the fibre result, this will cause it to blockecho $response;