Webhookチェックインをお惣菜コーナーに流す
This commit is contained in:
parent
fcdc00f165
commit
66322dfec0
@ -49,9 +49,9 @@ class Ejaculation extends Model
|
||||
return $this->hasMany(Like::class);
|
||||
}
|
||||
|
||||
public function scopeOnlyWebCheckin(Builder $query)
|
||||
public function scopePublic(Builder $query)
|
||||
{
|
||||
return $query->where('ejaculations.source', Ejaculation::SOURCE_WEB);
|
||||
return $query->whereIn('ejaculations.source', [Ejaculation::SOURCE_WEB, Ejaculation::SOURCE_WEBHOOK]);
|
||||
}
|
||||
|
||||
public function scopeWithLikes(Builder $query)
|
||||
|
@ -71,7 +71,7 @@ SQL
|
||||
->select('ejaculations.*')
|
||||
->with('user', 'tags')
|
||||
->withLikes()
|
||||
->onlyWebCheckin()
|
||||
->public()
|
||||
->take(21)
|
||||
->get();
|
||||
|
||||
|
@ -19,7 +19,7 @@ class TimelineController extends Controller
|
||||
->select('ejaculations.*')
|
||||
->with('user', 'tags')
|
||||
->withLikes()
|
||||
->onlyWebCheckin()
|
||||
->public()
|
||||
->paginate(21);
|
||||
|
||||
return view('timeline.public')->with(compact('ejaculations'));
|
||||
|
Loading…
Reference in New Issue
Block a user