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_partyvendor';
folder. So in my config file I have the following line:
$config['composer_autoload'] = APPPATH . 'third_partyvendorautoload.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 WebChemistryInvoiceDataCompany();
}
This results in the following error:
Message: Class 'WebChemistryInvoiceDataCompany' 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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…