スコープの簡略化

This commit is contained in:
shibafu 2020-05-24 19:42:16 +09:00
parent e2f01561a8
commit f3a5644a32

View File

@ -49,8 +49,7 @@ class Ejaculation extends Model
public function scopeOnlyWebCheckin(Builder $query) public function scopeOnlyWebCheckin(Builder $query)
{ {
return $query->where('ejaculations.source', null) return $query->where('ejaculations.source', Ejaculation::SOURCE_WEB);
->orWhere('ejaculations.source', '<>', Ejaculation::SOURCE_CSV);
} }
public function scopeWithLikes(Builder $query) public function scopeWithLikes(Builder $query)