1. Go to this page and download the library: Download linkorb/ticketbox-client 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/ */
linkorb / ticketbox-client example snippets
use Linkorb\TicketBoxClient\Client as Client;
use Linkorb\TicketBoxClient\Ticket as Ticket;
// get the client
$client = new Client(
'http://tickets.dev/api/v1/',
<username>,
<password>
);
// Create Ticket with Logged in user
$ticket = new Ticket( $client ); // padidng client
$ticket->setSubject(<ticket subject>);
$ticket->setDescription(<ticket descripton>);
try {
$ticket->create();
} catch( Exception $e ) {
echo $e->getMessage();
}
// Create Anon Ticket
$ticket = new Ticket( $client );
$ticket->get(<ticket id>);
echo $ticket->getSubject(); // all the field null if not found.
$activities = $ticket->getActivity(); // get activities
var_dump($activities);