diff --git a/app/Console/Commands/GenerateCrmClient.php b/app/Console/Commands/GenerateCrmClient.php index c22a060..9d72381 100644 --- a/app/Console/Commands/GenerateCrmClient.php +++ b/app/Console/Commands/GenerateCrmClient.php @@ -43,6 +43,20 @@ class GenerateCrmClient extends Command $this->copyExceptions(); $this->copyTranslations(); $this->copyRoutesList(); + $this->copyApiConfigInfo(); + } + + private function copyApiConfigInfo() + { + $this->info('Copy Api Config'); + $rootTarget = app_path('../' . self::TARGET); + if (File::exists("$rootTarget/../apiConfig.readonly.json")) { + File::delete("$rootTarget/../apiConfig.readonly.json"); + } + File::put( + "$rootTarget/../apiConfig.readonly.json", + \json_encode(config('api'), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) + ); } private function copyRoutesList()