From 22150d0e7ad280c9c0d34a7792e0196ccceee29d Mon Sep 17 00:00:00 2001 From: shibafu Date: Sun, 8 Sep 2019 16:32:37 +0900 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E3=81=98=E3=82=AA=E3=82=AB=E3=82=BA?= =?UTF-8?q?=E3=81=A7=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF=E3=82=A4=E3=83=B3?= =?UTF-8?q?=E3=81=99=E3=82=8B=E9=9A=9B=E3=81=AB=E3=82=BB=E3=83=B3=E3=82=B7?= =?UTF-8?q?=E3=83=86=E3=82=A3=E3=83=96=E3=83=95=E3=83=A9=E3=82=B0=E3=82=92?= =?UTF-8?q?=E7=B6=99=E6=89=BF=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Ejaculation.php | 13 +++++++++++++ resources/views/components/ejaculation.blade.php | 4 ++-- resources/views/ejaculation/show.blade.php | 2 +- resources/views/user/profile.blade.php | 2 +- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/app/Ejaculation.php b/app/Ejaculation.php index adeaff5..5c670f6 100644 --- a/app/Ejaculation.php +++ b/app/Ejaculation.php @@ -79,4 +79,17 @@ class Ejaculation extends Model ->addSelect(DB::raw('0 as is_liked')); } } + + /** + * このチェックインと同じ情報を流用してチェックインするためのURLを生成 + * @return string + */ + public function makeCheckinURL(): string + { + return route('checkin', [ + 'link' => $this->link, + 'tags' => $this->textTags(), + 'is_too_sensitive' => $this->is_too_sensitive, + ]); + } } diff --git a/resources/views/components/ejaculation.blade.php b/resources/views/components/ejaculation.blade.php index c0650d9..9635273 100644 --- a/resources/views/components/ejaculation.blade.php +++ b/resources/views/components/ejaculation.blade.php @@ -49,8 +49,8 @@
+ title="同じオカズでチェックイン" data-href="{{ $ejaculation->makeCheckinURL() }}"> -
\ No newline at end of file + diff --git a/resources/views/ejaculation/show.blade.php b/resources/views/ejaculation/show.blade.php index 2f24075..8d870e0 100644 --- a/resources/views/ejaculation/show.blade.php +++ b/resources/views/ejaculation/show.blade.php @@ -75,7 +75,7 @@ @endif
- + @if ($user->isMe()) diff --git a/resources/views/user/profile.blade.php b/resources/views/user/profile.blade.php index 2c36e3d..056a53e 100644 --- a/resources/views/user/profile.blade.php +++ b/resources/views/user/profile.blade.php @@ -81,7 +81,7 @@ @endif
- + @if ($user->isMe())