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())
    +