PHP code example of lenius / economic-php-client

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

    

lenius / economic-php-client example snippets


$appToken = 'demo';
$grant    = 'demo';

$client = new Lenius\Economic\RestClient($appToken, $grant);

$parms = ['pagesize' => 100];

$response = $client->request->get('customers', $parms);

$status = $response->httpStatus();

if ($status == 200) {
    // Successful request
    $data = $response->asArray();
    print_r($data);
}
 bash
$ composer