Skip to content

Commit

Permalink
composer file
Browse files Browse the repository at this point in the history
  • Loading branch information
BahaaAlhagar committed Jul 31, 2018
1 parent b329d75 commit 235c628
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
9 changes: 7 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,13 @@
"fix-style": "phpcbf -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests"
},
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
"laravel": {
"providers": [
"BahaaAlhagar\\YoutubeUploader\\YoutubeUploaderServiceProvider"
],
"aliases": {
"Cart": "BahaaAlhagar\\YoutubeUploader\\Facades\\YoutubeUploader"
}
}
},
"config": {
Expand Down
23 changes: 20 additions & 3 deletions src/YoutubeUploaderServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,30 @@
class YoutubeUploaderServiceProvider extends ServiceProvider
{
/**
* Perform post-registration booting of services.
* Indicates if loading of the provider is deferred.
*
* @return void
* @var bool
*/
protected $defer = false;

/**
* Bootstrap the application events.
*/
public function boot()
{
//
$config = realpath(__DIR__.'/../config/youtubeUploader.php');

$this->publishes([$config => config_path('youtubeUploader.php')], 'config');

$this->mergeConfigFrom($config, 'youtubeUploader');

$this->publishes([
__DIR__.'/../migrations/' => database_path('migrations')
], 'migrations');

if($this->app->config->get('youtube.routes.enabled')) {
include __DIR__.'/../routes/web.php';
}
}

/**
Expand Down

0 comments on commit 235c628

Please sign in to comment.