i got this code from github, laravel-hubspot but by this code it was getting only firstname and lastname if i declare: $contact->properties->email->value;
email or phonenumber or any other values from hubspot contacts it was not getting. And all i need is how to get all the contact fields details from the hubspot contact
$response = $hubspot->contacts()->all();
foreach ($response->contacts as $contact) {
echo sprintf(
"Contact name is %s %s." . PHP_EOL,
$contact->properties->firstname->value,
$contact->properties->lastname->value
);
}
$contacts = Hubspot::contacts()->all([
'property' => ['firstname', 'lastname', 'hs_lead_status', 'email']
]);
dd($contacts);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.