IsraelOrtuno / pipedrive

Complete Pipedrive API client for PHP
MIT License
166 stars 58 forks source link

Can't get fields #32

Closed githubuser441 closed 6 years ago

githubuser441 commented 6 years ago

when I trie to get pipedrive person fields I get the following error: Fatal error: Uncaught Error: Class 'Devio\Pipedrive\Resources\Personfields' not found in /home/jongensv/public_html/wp-content/plugins/pipedrive_klantenportaal/vendor/devio/pipedrive/src/Pipedrive.php:55 Stack trace: #0 /home/jongensv/public_html/wp-content/plugins/pipedrive_klantenportaal/vendor/devio/pipedrive/src/Pipedrive.php(131): Devio\Pipedrive\Pipedrive->make('personfields') #1 /home/jongensv/public_html/wp-content/plugins/pipedrive_klantenportaal/test.php(7): Devio\Pipedrive\Pipedrive->__get('personfields') #2 {main} thrown in /home/jongensv/public_html/wp-content/plugins/pipedrive_klantenportaal/vendor/devio/pipedrive/src/Pipedrive.php on line 55 The weird thing is that it is working on my local wamp machine but not on my production cpanel server. And loading deals also works great on both my local wamp machine and production cpanel server.

Code: `<?php require_once( dirname(FILE) . '/vendor/autoload.php' ); use Devio\Pipedrive\Pipedrive; $apikey = ""; $pipedrive = new Pipedrive($apikey);

$person_fields = $pipedrive->personfields->all(); $person_fields = $person_fields->getData(); var_dump($person_fields); `

IsraelOrtuno commented 6 years ago

Looks like in your dev machine your system is not case sensitive and it is on your production server. Replace personfields by personFields

githubuser441 commented 6 years ago

Thanks! Wasted 5hours because of this :(

IsraelOrtuno commented 6 years ago

Enjoy the package and I really hope it's helpful to you :)