I am trying to make a simple webform using laravel and trying to decode the api docs. If i have to create a form, i will need to create 3 api requests.
- Create Organization
- Create Person under that Organization
- Create Deal under that Person.
I was wondering that laravel wrapper by Devio should be able to cover this, or do i need guzzle or Zttp to create three requests everytime.
Thanks in advance.
you can use the wrapper. It’s very simple:
// instantiate $pipedrive like shown in the documentation
$organization = $pipedrive->organizations->add(['name' => 'New Organization']);
$person = $pipedrive->persons->add(['name' => 'John Doe', 'org_id' => $organization->getData()->id]);
$deal = $pipedrive->deals->add(['title' => 'Amazing Deal', 'person_id' => $person->getData()->id]);
To instantiate and authorize, you can look at the documentation: https://github.com/IsraelOrtuno/pipedrive
Finally created a video. If anyone is looking to do this. https://youtu.be/BH95Wz9dwns