Rename ejaculation scope "public" -> "visibleToTimeline"
This commit is contained in:
parent
0587a0f1d4
commit
35aa7b3916
@ -49,7 +49,7 @@ class Ejaculation extends Model
|
||||
return $this->hasMany(Like::class);
|
||||
}
|
||||
|
||||
public function scopePublic(Builder $query)
|
||||
public function scopeVisibleToTimeline(Builder $query)
|
||||
{
|
||||
return $query->whereIn('ejaculations.source', [Ejaculation::SOURCE_WEB, Ejaculation::SOURCE_WEBHOOK]);
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ SQL
|
||||
->select('ejaculations.*')
|
||||
->with('user', 'tags')
|
||||
->withLikes()
|
||||
->public()
|
||||
->visibleToTimeline()
|
||||
->take(21)
|
||||
->get();
|
||||
|
||||
|
@ -19,7 +19,7 @@ class TimelineController extends Controller
|
||||
->select('ejaculations.*')
|
||||
->with('user', 'tags')
|
||||
->withLikes()
|
||||
->public()
|
||||
->visibleToTimeline()
|
||||
->paginate(21);
|
||||
|
||||
return view('timeline.public')->with(compact('ejaculations'));
|
||||
|
Loading…
Reference in New Issue
Block a user