PHP code example of zakirullin / pipedrive
1. Go to this page and download the library: Download zakirullin/pipedrive 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/ */
zakirullin / pipedrive example snippets
akirullin\Pipedrive\Pipedrive;
$pipedrive = new Pipedrive('token');
// Get by id
$organization = $pipedrive->organizations->findOne(1);
// Create
$id = $pipedrive->notes->create(['content' => 'Note']);
// Update
$pipedrive->persons->find(1)->update(['name' => 'New name']);
// Find person with phone '777' for organization with name 'Github'
$person = $pipedrive->organizations->find(['name' => 'Github'])->persons->findAll(['phone' => '777']);
// Update all notes for matched organizations whole name is 'Github'
$notes = $pipedrive->organizations->find(['name' => 'Github'])->notes;
foreach ($notes as $note) {
$note->content = 'Good news!';
$this->pipedrive->notes->update($note);
}