/**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     $this->app->singleton('orchestra.tenanti', function (Application $app) {
         $manager = new TenantiManager($app);
         $namespace = $this->hasPackageRepository() ? 'orchestra/tenanti::' : 'orchestra.tenanti';
         $manager->setConfig($app->make('config')->get($namespace));
         return $manager;
     });
     $this->app->alias('orchestra.tenanti', TenantiManager::class);
 }
 /**
  * Get tenant configuration.
  *
  * @param  string  $key
  * @param  mixed  $default
  *
  * @return mixed
  */
 protected function getConfig($key, $default = null)
 {
     return $this->manager->getConfig("{$this->driver}.{$key}", $default);
 }