PHP code example of zephia / laravel-pilot
1. Go to this page and download the library: Download zephia/laravel-pilot 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/ */
zephia / laravel-pilot example snippets
'providers' => [
...
Zephia\LaravelPilot\LaravelPilotServiceProvider::class,
...
]
/**
* Create Lead
*/
// From array (field names without "pilot_" prefix)
$lead_data = new \Zephia\PilotApiClient\Model\LeadData([
'business_type_id' => 1,
'contact_type_id' => 1,
'suborigin_id' => 'FFFF0000',
'firstname' => 'John',
'lastname' = 'Doe',
'phone' => '+543512345678',
'email' => '[email protected] '
]);
// Using setters (camelcase)
$lead_data = new \Zephia\PilotApiClient\Model\LeadData();
$lead_data->setBusinessTypeId(1);
$lead_data->setContactTypeId(1);
$lead_data->setSuboriginId('FFFF0000');
$lead_data->setFirstName('John');
$lead_data->setLastName('Doe');
$lead_data->setPhone('+543512345678');
$lead_data->setEmail('[email protected] ');
/**
* Store Lead
*/
$pilot = app('pilot')->storeLead($lead_data);
// Returns API response object.
bash
php artisan vendor:publish --provider="Zephia\LaravelPilot\LaravelPilotServiceProvider" --tag="config"