/**
  * {@inheritdoc}
  */
 public function bootstrap(Application $app)
 {
     $config = $app->get(ConfigManager::class);
     $providers = $config->get('app.serviceprovider', []);
     if (count($providers) > 0) {
         foreach ($providers as $provider) {
             $app->register($app->make($provider));
         }
     }
 }
Exemple #2
0
 /**
  * Get the cerebro application instance.
  *
  * @return \Viserio\Console\Application
  */
 protected function getconsole() : Cerebro
 {
     if (is_null($this->console)) {
         $console = $this->app->get(Cerebro::class);
         foreach ($this->commands as $command) {
             $console->add($this->app->make($command));
         }
         return $this->console = $console;
     }
     return $this->console;
 }