PHP code example of gkite13 / vtiger-api-bundle

1. Go to this page and download the library: Download gkite13/vtiger-api-bundle 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/ */

    

gkite13 / vtiger-api-bundle example snippets

 php
$queryString = "SELECT * FROM ModuleName";
$result = $this->vtigerApi->query($queryString);
 php
$leadId = "10x12345";
$result = $this->vtigerApi->retrieve($leadId);
 php
$lead = new \stdClass();
$lead->property1 = 'test';
$lead->property2 = 12345;
$result = $this->vtigerApi->create('EntityType', $lead);
 php
$leadId = "10x12345";
$lead = $this->vtigerApi->retrieve($leadId);
$lead->property1 = 'test2';
$lead->property2 = 123;
$result = $this->vtigerApi->update($lead);
 php
$leadId = "10x12345";
$result = $this->vtigerApi->delete($leadId);