Skip to content

Commit

Permalink
remove unnecessary varible and overwrite constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
joisarjignesh committed May 2, 2020
1 parent c313e0b commit 5959a8a
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/BigbluebuttonServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

namespace JoisarJignesh\Bigbluebutton;

use Illuminate\Support\ServiceProvider;

class BigbluebuttonServiceProvider extends ServiceProvider
Expand All @@ -12,7 +13,7 @@ public function boot()
{
if ($this->app->runningInConsole()) {
$this->publishes([
__DIR__.'/../config/bigbluebutton.php' => config_path('bigbluebutton.php'),
__DIR__ . '/../config/bigbluebutton.php' => config_path('bigbluebutton.php'),
], 'bigbluebutton-config');
}
}
Expand All @@ -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')
)
);
});
}
}

0 comments on commit 5959a8a

Please sign in to comment.