php - Yii2 autoload Youtube API -
i trying include youtube api in controller. have unzipped google youtube api in path
app\components\google
now should include google youtube api files. when create object of google_client says google_client class not found. know file not including when try include via
require(yii::$app->basepath.'/components/google/client.php)
again same error comes class not found idea ?
i've found way use it, added repository url in composer.json
.
"repositories": [ { "url": "https://github.com/google/google-api-php-client.git", "type": "git" } ],
after ran command of composer update
, composers copies repo in vendor folder. can use use \google\client
namespace use it.
Comments
Post a Comment