From 598a8ee325c05ca2f1adc99105fa812f16e9367b Mon Sep 17 00:00:00 2001 From: Kosuke Shibuya Date: Thu, 1 Jun 2023 22:59:46 +0900 Subject: [PATCH] mod langfilr:export (#5) --- src/Console/TransExportCommend.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Console/TransExportCommend.php b/src/Console/TransExportCommend.php index 0922882..ff6214c 100644 --- a/src/Console/TransExportCommend.php +++ b/src/Console/TransExportCommend.php @@ -47,7 +47,7 @@ public function handle(): void ]; })->toArray(); - $tables = Table::all()->mapWithKeys(function(TableInterface $table){ + $tables = Table::all()->mapWithKeys(function (TableInterface $table) { return [$table->TABLE_NAME => $table->TABLE_COMMENT]; })->toArray(); @@ -59,6 +59,8 @@ public function handle(): void if (!file_exists($dir) && !mkdir($dir, true) && !is_dir($dir)) { throw new \RuntimeException(sprintf('Directory "%s" was not created', $dir)); } + $old = require($dir . '/columns.php'); + $response = array_merge($response, $old); File::put( $dir . '/columns.php',