From 503e8ba093ee1901ebb0ff639960d2c2cda749d1 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sat, 2 Jun 2018 23:33:16 +0900 Subject: [PATCH] =?UTF-8?q?=E3=80=8C=E5=90=8C=E3=81=98=E3=82=AA=E3=82=AB?= =?UTF-8?q?=E3=82=BA=E3=81=A7=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E3=80=8D=E3=83=9C=E3=82=BF=E3=83=B3=E3=81=AE=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Ejaculation.php | 5 +++++ resources/views/ejaculation/edit.blade.php | 2 +- resources/views/ejaculation/show.blade.php | 1 + resources/views/user/profile.blade.php | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/Ejaculation.php b/app/Ejaculation.php index 399783a..48bdaf9 100644 --- a/app/Ejaculation.php +++ b/app/Ejaculation.php @@ -27,4 +27,9 @@ class Ejaculation extends Model { return $this->belongsToMany('App\Tag')->withTimestamps(); } + + public function textTags() + { + return implode(' ', $this->tags->map(function ($v) { return $v->name; })->all()); + } } diff --git a/resources/views/ejaculation/edit.blade.php b/resources/views/ejaculation/edit.blade.php index ed94a68..293802d 100644 --- a/resources/views/ejaculation/edit.blade.php +++ b/resources/views/ejaculation/edit.blade.php @@ -37,7 +37,7 @@
- +
    diff --git a/resources/views/ejaculation/show.blade.php b/resources/views/ejaculation/show.blade.php index 6afbfd8..c9006cc 100644 --- a/resources/views/ejaculation/show.blade.php +++ b/resources/views/ejaculation/show.blade.php @@ -28,6 +28,7 @@
    {{ $ejaculatedSpan ?? '精通' }} {{ $ejaculation->before_date }}{{ !empty($ejaculation->before_date) ? ' ~ ' : '' }}{{ $ejaculation->ejaculated_date->format('Y/m/d H:i') }}
    @if ($user->isMe())
    +
    diff --git a/resources/views/user/profile.blade.php b/resources/views/user/profile.blade.php index e3f3e50..8bc7c14 100644 --- a/resources/views/user/profile.blade.php +++ b/resources/views/user/profile.blade.php @@ -14,6 +14,7 @@
    {{ $ejaculation->ejaculated_span ?? '精通' }} {{ $ejaculation->before_date }}{{ !empty($ejaculation->before_date) ? ' ~ ' : '' }}{{ $ejaculation->ejaculated_date->format('Y/m/d H:i') }}
    @if ($user->isMe())
    +