This is self-hosted.
I have a directory named /opt/integration
I ran: composer require invoiceninja/sdk-php in that directory.
I have a file named addCustomer.php that contains:
<?php
use InvoiceNinja\Config as NinjaConfig;
use InvoiceNinja\Models\Client;
NinjaConfig::setURL('https:/www.examplecom/in/api/v1');
NinjaConfig::setToken('xxxxxxxxxxxxxxxxxx');
$client = new Client('test@example.com');
$client->save();
?>
php addCustomer.php says:
PHP Fatal error: Uncaught Error: Class 'InvoiceNinja\Config' not found in /opt/integration/addCustomer.php:7
Stack trace:
#0 {main}
thrown in /opt/integration/addCustomer.php on line 7
Fatal error: Uncaught Error: Class 'InvoiceNinja\Config' not found in /opt/integration/addCustomer.php:7
Stack trace:
#0 {main}
thrown in /opt/integration/addCustomer.php on line 7
AFAIK, the sdk is installed correctly: /opt/integration/vendor/invoiceninja/sdk-php/src/InvoiceNinja/Models contains all the various models (Client, etc.)
Can anybody tell me what I’m missing?
Is there a path I need to set somewhere?
This is self-hosted on Fedora. There is nothing in storage/logs/laravel-error log
Any help is appreciated.
Thanks!
Terry