PHP code example of ayles-software / laravel-zoho-desk
1. Go to this page and download the library: Download ayles-software/laravel-zoho-desk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ayles-software / laravel-zoho-desk example snippets
namespace App\Http\Controllers;
use AylesSoftware\ZohoDesk\ZohoOAuth;
class ZohoOAuthController extends Controller
{
public function __invoke(ZohoOAuth $zohoOAuth)
{
return $zohoOAuth->flow();
}
}
use AylesSoftware\ZohoDesk\Facades\ZohoDesk;
# create a ticket
# for more options see https://desk.zoho.com.au/support/APIDocument.do#Tickets#Tickets_Createaticket
$response = ZohoDesk::createTicket([
'subject' => 'Support message - Test user',
'description' => 'This is the body of the ticket',
'departmentId' => '0000000000000000', // this can be found within ZohoDesk
'email' => '[email protected]',
'contact' => [
'email' => '[email protected]',
'firstName' => 'Benjamin',
],
]);