I am trying to use the invoice generator from webchemistry. I installed this with composer require webchemistry/invoice:^1.0
.
I moved this folder to my APPPATH . 'third_party\vendor\';
folder. So in my config file I have the following line:
$config['composer_autoload'] = APPPATH . 'third_party\vendor\autoload.php';
my index.php file (in root) contains this code:
include_once BASEPATH.'../application/third_party/vendor/autoload.php';
In my controller I am trying to do the following :
public function createInvoice()
{
$company = new \WebChemistry\Invoice\Data\Company();
}
This results in the following error:
Message: Class 'WebChemistry\Invoice\Data\Company' not found
When in my IDE (PhpStorm) I ctrl + click on Company, it can resolve correctly and points to the correct file. Why can PHP not resolve this to the correct file location?