PHP code example of navari / laravel-zoho-desk

1. Go to this page and download the library: Download navari/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/ */

    

navari / laravel-zoho-desk example snippets


return [
    'organizationId' => env('ZOHO_DESK_ORGANIZATION_ID', ''),
    'departmentId' => env('ZOHO_DESK_DEPARTMENT_ID', ''),
    'clientId' => env('ZOHO_DESK_CLIENT_ID', ''),
    'clientSecret' => env('ZOHO_DESK_CLIENT_SECRET', ''),
    'oAuthBaseUrl' => env('ZOHO_DESK_OAUTH_BASE_URL', ''),
    'refreshToken' => env('ZOHO_DESK_REFRESH_TOKEN', ''),
    'baseApiUrl' => env('ZOHO_DESK_BASE_API_URL', 'https://desk.zoho.com/api/v1/'),
    'agentEmail' => env('ZOHO_DESK_AGENT_EMAIL', ''),
];

$createTicketEntity = new \Navari\ZohoDesk\Entities\CreateTicketEntity();

$createTicketEntity->firstName = 'Larus';
$createTicketEntity->lastName = 'Navari';
$createTicketEntity->email = '[email protected]';
$createTicketEntity->subject = 'Test Ticket';
$createTicketEntity->departmentId = '123456789';
$createTicketEntity->message = 'This is a test ticket';
$ticket = \Navari\ZohoDesk\ZohoDesk::createTicket($createTicketEntity);
bash
php artisan vendor:publish --tag="laravel-zoho-desk-config"