diff --git a/src/Console/Commands/OrchestrateService.php b/src/Console/Commands/OrchestrateService.php index 1d5c489..5bb37fe 100644 --- a/src/Console/Commands/OrchestrateService.php +++ b/src/Console/Commands/OrchestrateService.php @@ -11,8 +11,8 @@ class OrchestrateService extends Command { - use AsksQuestions, - GeneratesFiles; + use AsksQuestions; + use GeneratesFiles; /** * The name and signature of the console command. @@ -38,7 +38,7 @@ class OrchestrateService extends Command /** * The driver to execute the new service. - * + * * @var Payavel\Orchestration\ServiceDriver */ protected $driver; @@ -98,7 +98,7 @@ protected function setProperties() * * @return void */ - protected function generateService() + protected function generateService() { $studlyService = Str::studly($this->service->getId()); @@ -126,6 +126,10 @@ protected function generateService() $this->driver::generateService($this->service, $this->providers, $this->merchants, $this->defaults); + if (file_exists($serviceConfig = config_path(Str::slug($this->service->getId()) . '.php'))) { + Config::set(Str::slug($this->service->getId()), require($serviceConfig)); + } + $this->info('The ' . Str::lower($this->service->getName()) . ' config has been successfully generated.'); } @@ -136,8 +140,6 @@ protected function generateService() */ protected function generateProviders() { - $this->callSilently('config:clear'); - $this->call("orchestrate:provider", ['--service' => $this->service->getId(), '--fake' => true]); $this->providers->each(