From 3015f8261180b2f6aea0d3eb101b8c15418fec0b Mon Sep 17 00:00:00 2001 From: shibafu Date: Wed, 19 Aug 2020 09:46:18 +0900 Subject: [PATCH] =?UTF-8?q?=E9=9D=9E=E5=85=AC=E9=96=8B=E3=83=95=E3=83=A9?= =?UTF-8?q?=E3=82=B0=E3=80=81=E3=82=BB=E3=83=B3=E3=82=B7=E3=83=86=E3=82=A3?= =?UTF-8?q?=E3=83=96=E3=83=95=E3=83=A9=E3=82=B0=E3=81=AECSV=E5=87=BA?= =?UTF-8?q?=E5=8A=9B=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/CheckinCsvExporter.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/Services/CheckinCsvExporter.php b/app/Services/CheckinCsvExporter.php index a94ec32..22607a0 100644 --- a/app/Services/CheckinCsvExporter.php +++ b/app/Services/CheckinCsvExporter.php @@ -30,7 +30,7 @@ class CheckinCsvExporter $csv->addStreamFilter('convert.mbstring.encoding.UTF-8:SJIS-win'); } - $header = ['日時', 'ノート', 'オカズリンク']; + $header = ['日時', 'ノート', 'オカズリンク', '非公開', 'センシティブ']; for ($i = 1; $i <= 32; $i++) { $header[] = "タグ{$i}"; } @@ -45,6 +45,8 @@ class CheckinCsvExporter $ejaculation->ejaculated_date->format('Y/m/d H:i'), $ejaculation->note, $ejaculation->link, + self::formatBoolean($ejaculation->is_private), + self::formatBoolean($ejaculation->is_too_sensitive), ]; foreach ($ejaculation->tags->take(32) as $tag) { $record[] = $tag->name; @@ -54,4 +56,9 @@ class CheckinCsvExporter }); }); } + + private static function formatBoolean($value): string + { + return $value ? 'true' : 'false'; + } }