From 26be8a086e5b34dbdf602839d4cf4d030b0bf6ee Mon Sep 17 00:00:00 2001 From: shibafu Date: Sat, 9 Nov 2019 23:19:28 +0900 Subject: [PATCH] =?UTF-8?q?=E7=A9=BA=E6=96=87=E5=AD=97=E5=88=97=E3=81=AE?= =?UTF-8?q?=E3=82=BF=E3=82=B0=E3=81=AF=E4=BF=9D=E5=AD=98=E3=81=9B=E3=81=9A?= =?UTF-8?q?=E6=8D=A8=E3=81=A6=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/EjaculationController.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Http/Controllers/EjaculationController.php b/app/Http/Controllers/EjaculationController.php index d509bdb..c0d6277 100644 --- a/app/Http/Controllers/EjaculationController.php +++ b/app/Http/Controllers/EjaculationController.php @@ -65,6 +65,10 @@ class EjaculationController extends Controller if (!empty($inputs['tags'])) { $tags = explode(' ', $inputs['tags']); foreach ($tags as $tag) { + if ($tag === '') { + continue; + } + $tag = Tag::firstOrCreate(['name' => $tag]); $tagIds[] = $tag->id; } @@ -151,6 +155,10 @@ class EjaculationController extends Controller if (!empty($inputs['tags'])) { $tags = explode(' ', $inputs['tags']); foreach ($tags as $tag) { + if ($tag === '') { + continue; + } + $tag = Tag::firstOrCreate(['name' => $tag]); $tagIds[] = $tag->id; }