mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 22:41:27 +00:00
Update TimelineController
This commit is contained in:
parent
865a7c4da5
commit
5f13428197
1 changed files with 2 additions and 0 deletions
|
@ -20,6 +20,7 @@ class TimelineController extends Controller
|
||||||
$following->push(Auth::user()->profile->id);
|
$following->push(Auth::user()->profile->id);
|
||||||
$timeline = Status::whereIn('profile_id', $following)
|
$timeline = Status::whereIn('profile_id', $following)
|
||||||
->orderBy('id','desc')
|
->orderBy('id','desc')
|
||||||
|
->withCount(['comments', 'likes'])
|
||||||
->simplePaginate(20);
|
->simplePaginate(20);
|
||||||
$type = 'personal';
|
$type = 'personal';
|
||||||
return view('timeline.template', compact('timeline', 'type'));
|
return view('timeline.template', compact('timeline', 'type'));
|
||||||
|
@ -31,6 +32,7 @@ class TimelineController extends Controller
|
||||||
// $timeline = Timeline::build()->local();
|
// $timeline = Timeline::build()->local();
|
||||||
$timeline = Status::whereHas('media')
|
$timeline = Status::whereHas('media')
|
||||||
->whereNull('in_reply_to_id')
|
->whereNull('in_reply_to_id')
|
||||||
|
->withCount(['comments', 'likes'])
|
||||||
->orderBy('id','desc')
|
->orderBy('id','desc')
|
||||||
->simplePaginate(20);
|
->simplePaginate(20);
|
||||||
$type = 'local';
|
$type = 'local';
|
||||||
|
|
Loading…
Reference in a new issue