Closed iamharisali closed 3 years ago
Any News here?
@iamharisali sorry! I mist your issue completely. This package is still work in progress and so is the documentation. We've just added two new methods to set the due date on a ticket and add a comment to a ticket. Below you will find an example on how we use it in one of our projects.
Hope this helps!!
public function addToZoho()
{
if (ZohoDesk::notActive()) {
return;
}
$product = ($this->product) ? ZohoProduct::findOrCreate($this->product->fullname()) : null;
$contact = Contact::findOrCreate($this->email, [
'lastName' => $this->last_name,
'firstName' => $this->first_name,
'email' => $this->email,
'phone' => $this->phonenumber,
'city' => $this->city,
'street' => trim($this->street . ' ' . $this->house_number),
'zip' => $this->zipcode,
'cf' => [
'cf_woonplaats' => $this->city,
],
]);
$ticket = Ticket::create($contact, now()->addMinutes(15), $product, [
'description' => $this->comment,
'subject' => __('Your request at') . ' ' . config('app.name'),
'email' => $this->email,
'phone' => $this->phonenumber,
'cf' => [
'cf_link_to_cms' => $cms_url,
'cf_referer' => $this->referer,
'cf_source' => $conversion->source,
],
]);
}
Can you please provide some kind of documentation on how to use this package inside code?
This is what I tried but it doesn't seem to work properrly