I want to use google api in my CodeIgniter 4.
First I have downloaded and installed google api from https://github.com/googleapis/google-api-php-client
2nd i need to create library in CI4 library
require APPPATH . "ThirdParty/google/vendor/autoload.php";
class Google extends Google_Client {
function __construct($params = array()) {
parent::__construct();
}
}
Then i want to access in my model model constructor code is below
public function __construct()
{
parent::__construct();
$this->load->library('google');
}
after loading library is showing error
Error Call to a member function library() on null
please help how should i use