From 5959a8aefef566ba6f1ad32c7101d3f38721d48c Mon Sep 17 00:00:00 2001 From: Jignesh Date: Sat, 2 May 2020 17:34:49 +0530 Subject: [PATCH] remove unnecessary varible and overwrite constructor --- src/BigbluebuttonServiceProvider.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/BigbluebuttonServiceProvider.php b/src/BigbluebuttonServiceProvider.php index 0dbad49c26..e1bcbe0a1e 100644 --- a/src/BigbluebuttonServiceProvider.php +++ b/src/BigbluebuttonServiceProvider.php @@ -1,6 +1,7 @@ app->runningInConsole()) { $this->publishes([ - __DIR__.'/../config/bigbluebutton.php' => config_path('bigbluebutton.php'), + __DIR__ . '/../config/bigbluebutton.php' => config_path('bigbluebutton.php'), ], 'bigbluebutton-config'); } } @@ -22,13 +23,15 @@ public function boot() */ public function register() { - $this->mergeConfigFrom(__DIR__.'/../config/bigbluebutton.php', 'bigbluebutton'); - - $server_base_url = $this->app['config']->get('bigbluebutton.BBB_SERVER_BASE_URL'); - $server_salt = $this->app['config']->get('bigbluebutton.BBB_SECURITY_SALT'); + $this->mergeConfigFrom(__DIR__ . '/../config/bigbluebutton.php', 'bigbluebutton'); $this->app->singleton('Bigbluebutton', function () { - return new Bbb(new BigBlueButton($server_base_url,$server_salt)); + return new Bbb( + new Bigbluebutton( + $this->app['config']->get('bigbluebutton.BBB_SERVER_BASE_URL'), + $this->app['config']->get('bigbluebutton.BBB_SECURITY_SALT') + ) + ); }); } }