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