PHP code example of comfortable / php-sdk

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

    

comfortable / php-sdk example snippets



Comfortable;

$api = Comfortable\Api::connect('{repository-api-id}', '{api-key}');

try {
  // get all documents stored in comfortable (default limit: 25)
  $results = $api->getDocuments()->execute();
} catch (\RuntimeException $e) {
  echo 'Comfortalbe SDK returned an error: ' . $e->getMessage();
  exit;
}