makeabledk / laravel-youtube
Fetch data from a users youtube channel(s)
dev-master
2017-12-09 09:46 UTC
Requires
- php: ^7.1
- google/apiclient: ^2.0
- illuminate/support: ^5.5
Requires (Dev)
- laravel/laravel: ^5.5
- phpunit/phpunit: ^6.3
This package is auto-updated.
Last update: 2024-11-04 22:41:35 UTC
README
Fetches YouTube channel data based on oAuth
Installation
composer require makeabledk/laravel-youtube
Add the following config to your config/services.php
return [ // ... 'google' => [ 'oauth_client_id' => env('GOOGLE_OAUTH_CLIENT_ID'), // provide your client id 'oauth_client_secret' => env('GOOGLE_OAUTH_CLIENT_SECRET'), // provide your client secreT ],
Example usage
$user = YoutubeUser::find($token); // Provide refresh token $channels = $user->getChannels(); echo $channels->first()->getSubscribers();