I'm using the Codeigniter framework and trying to integrate with SendInBlue's PHP API. Their PHP documentation is not super helpful and the setup instructions on Github not clear either.
The doc says to "Download the files and include autoload.php":
require_once('/path/to/APIv3-php-library/vendor/autoload.php');
But I cannot find autoload
anywhere and I'm not really sure how to include that in my CI structure.
Update:
I contacted Sendinblue support and they do not have any installation tutorial for CI users. I tried using Compiler, and got the folder structure created but I'm still having issues integrating it with CI. I placed all the folders in my Libraries but it is not loaded correctly and complains about Autoload class not existing.
To get the autoload.php, you need to use Composer. This will resolve all dependencies and install/update them for you.
If you already have the entire SendInBlue API folder structure in the library location, you can only add in your controller, before class My_Class ...
line require_once (APPPATH . 'vendor/autoload.php');
eg.
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
// include manually module library - SendInBlue API
require_once (APPPATH . 'vendor/autoload.php');
class My_Class extends CI_Controller {
....
After that, you can follow the guide from Github: APIv3-php-library - Getting Started
If you get errors, means that your SendInBlue's structure is bad. I recommand you to use Composer
autoload.php
in your controller - see the previous examplePlease add here the list of errors if you still have issues.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With