diff options
author | emkael <emkael@tlen.pl> | 2025-04-08 02:24:30 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2025-04-08 02:24:30 +0200 |
commit | af150891df3b90fda846941d62ea76616f42a6ab (patch) | |
tree | 6363926d7f4a2fe09dc4d1b763b67fbb8d949c09 /lib/php-youtube-api/src/YoutubeServiceProviderLaravel5.php | |
parent | af2da903d47550cdf1d7eb2d7b5e5b972d847958 (diff) |
Diffstat (limited to 'lib/php-youtube-api/src/YoutubeServiceProviderLaravel5.php')
-rw-r--r-- | lib/php-youtube-api/src/YoutubeServiceProviderLaravel5.php | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/lib/php-youtube-api/src/YoutubeServiceProviderLaravel5.php b/lib/php-youtube-api/src/YoutubeServiceProviderLaravel5.php new file mode 100644 index 0000000..2b829d4 --- /dev/null +++ b/lib/php-youtube-api/src/YoutubeServiceProviderLaravel5.php @@ -0,0 +1,46 @@ +<?php + +namespace Madcoda\Youtube; + +use Madcoda\Youtube\Youtube; +use Illuminate\Support\ServiceProvider; + +class YoutubeServiceProviderLaravel5 extends ServiceProvider +{ + protected $defer = true; + + /** + * Perform post-registration booting of services. + * + * @return void + */ + public function boot() + { + $this->publishes([ + __DIR__.'/config/youtube.php' => config_path('youtube.php'), + ]); + } + + /** + * Register bindings in the container. + * + * @return void + */ + public function register() + { + $this->app->bind('Madcoda\Youtube\Youtube', function ($app) { + return new Youtube($app['config']->get('youtube')); + }); + } + + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return ['Madcoda\Youtube\Youtube']; + } +} |