简体   繁体   English

我正在尝试将 hubspot 与 laravel 集成

[英]iam trying to integrate hubspot with laravel

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;我从 github, laravel-hubspot得到这个代码,但是如果我声明,通过这个代码它只得到名字和姓氏: $contact->properties->email->value; email or phonenumber or any other values from hubspot contacts it was not getting. email 或电话号码或来自 hubspot 联系人的任何其他值,它没有得到。 And all i need is how to get all the contact fields details from the hubspot contact我所需要的只是如何从 hubspot 联系人获取所有联系人字段详细信息

$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);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM