Client generate add api config json

This commit is contained in:
Jérémy Munsch 2021-08-04 13:17:00 +02:00
parent 022507a72c
commit 856e708e46

View file

@ -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()