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; }