From c20a8066c956dc6ecce48dcb65f6074ab1a53309 Mon Sep 17 00:00:00 2001 From: shibafu Date: Tue, 9 Apr 2019 22:55:14 +0900 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E3=82=AF=E3=82=A8=E3=83=AA///?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Ejaculation.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Ejaculation.php b/app/Ejaculation.php index 7a8b2a7..d0a58f7 100644 --- a/app/Ejaculation.php +++ b/app/Ejaculation.php @@ -5,6 +5,7 @@ namespace App; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\DB; class Ejaculation extends Model { @@ -63,7 +64,7 @@ class Ejaculation extends Model $query->where('is_protected', false); }]) ->withCount('likes') - ->addSelect('0 as is_liked'); + ->addSelect(DB::raw('0 as is_liked')); } } }