PHP code example of chrisjohnleah / joblogic-api-laravel

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

    

chrisjohnleah / joblogic-api-laravel example snippets


use ChrisJohnLeah\JoblogicLaravel\Facades\Joblogic;

$client = Joblogic::client([
    'client_id' => $clientId,
    'client_secret' => $clientSecret,
    'tenant_id' => $tenantId,
]);

$customers = $client->search('Customer/GetAll', [
    'IncludeInactive' => true,
]);

// The returned client also exposes the documented upload/note primitives:
// $uploadUri = $client->getUploadFileUri('doorops-form.pdf');
// $client->uploadFile($uploadUri->json('Uri'), $pdfStream);
// $client->createNote([
//     'EntityId' => $jobId,
//     'EntityType' => 3,
//     'NoteText' => 'DoorOps reviewed form',
//     'Attachments' => [['AttachmentLink' => $uploadUri->json('Uri'), 'Name' => 'doorops-form.pdf']],
// ]);
shell
php artisan vendor:publish --tag=joblogic-config