Google API php client |
hi, I am trying to use the google client api. Following the instructions of developers.google.com/sheets/api/quickstart/php, I can't get to instantiate the client object.
I put this code in my controller: PHP Code: <?php namespace App\Controllers; but I get the error: Class 'App\Controllers\Google_Client' not found I appreciate any help, thanks
code live
You installed it the manual way correct?
Try with: new \Google_Client(); PS. Moved your thread to General help as it's more of a PHP7 and namespacing problem than CI4.
It has worked, I have already understood, thank you.
I have another question, yesterday I tried to install with composer. Install CI 4 first and then API Google Client. But I notice that a vendor folder has been created with a copy of the CI4 structure inside. This is normal?
code live
Great that it worked out for you!
It's the correct structure for the Appstarter. You can read more in this thread: https://forum.codeigniter.com/thread-76237.html
I think I just understood how composer works. It is amazing, i think that is the best option for future updates.
Thank you so much!!
code live
|
Welcome Guest, Not a member yet? Register Sign In |