PipeDrive for Laravel 4
Its client api to access data from pipedrive, (*1)
Installation
Include laravel4pipedrive as a dependency in composer.json:, (*2)
"jrshah/laravel4pipedrive": "0.*"
Run composer install
to download the dependency., (*3)
Add the ServiceProvider to your provider array within app/config/app.php
:, (*4)
'providers' => array(
'Jrshah\Laravel4pipedrive\Laravel4pipedriveServiceProvider'
)
Finally, publish the configuration files via php artisan config:publish jrshah/laravel4pipedrive
., (*5)
Configuration
Once you have published the configuration files, you can set your API Token, Url and Version in app/config/packages/jrshah/laravel4pipedrive/config.php
:, (*6)
<?php
return array(
'api_token' => 'your-pipedrive-token',
'api_url' => 'api-url-for-pipedrive',
'api_version' => 'pipedrive-api-version'
);
Usage
// get all deals
PipeDrive::request('GET','deals');
// update a deal
PipeDrive::request('PUT','deals',1,array('title'=>'update the title'));