生クエリ///
This commit is contained in:
parent
664448b9fc
commit
c20a8066c9
@ -5,6 +5,7 @@ namespace App;
|
|||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
class Ejaculation extends Model
|
class Ejaculation extends Model
|
||||||
{
|
{
|
||||||
@ -63,7 +64,7 @@ class Ejaculation extends Model
|
|||||||
$query->where('is_protected', false);
|
$query->where('is_protected', false);
|
||||||
}])
|
}])
|
||||||
->withCount('likes')
|
->withCount('likes')
|
||||||
->addSelect('0 as is_liked');
|
->addSelect(DB::raw('0 as is_liked'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user