1. Go to this page and download the library: Download badchoice/handesk-php 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/ */
badchoice / handesk-php example snippets
// In AppServiceProvider boot method
Handesk::setup(config('services.handesk.url'), config('services.handesk.token'));
$ticket->addComment("Adding a comment");
$ticket->addComment("Adding a comment and solving the ticket", true);
$team = Team::create("team name", "team email";
(new Team(2))->tickets(); //gets all open tickets for team with id 2
(new Team(2))->tickets('solved'); //gets all solved tickets for team with id 2
(new Team(2))->ticketsCount(); //gets the count of all open tickets for team with id 2
(new Team(2))->ticketsCount('closed'); //gets the count of all closed tickets for team with id 2
(new Team(2))->leads(); //gets the open leads for a team (paginated)
(new Team(2))->leadsCount(); //gets the count of all live leads for team with id 2