Skip to content

Commit

Permalink
fix(feat): 获取用户动态返回话题数据
Browse files Browse the repository at this point in the history
  • Loading branch information
medz committed Aug 2, 2018
1 parent 8f8be30 commit 1d8f9ce
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions packages/slimkit-plus-feed/src/API2/FeedController.php
Original file line number Diff line number Diff line change
Expand Up @@ -792,11 +792,17 @@ public function users(Request $request, FeedModel $feedModel, FeedRepository $re
->when($after, function ($query) use ($after) {
return $query->where('id', '<', $after);
})
->with(['pinnedComments' => function ($query) use ($datetime) {
return $query->where('expires_at', '>', $datetime)->limit(5);
}, 'user' => function ($query) {
return $query->withTrashed();
}])
->with([
'pinnedComments' => function ($query) use ($datetime) {
return $query->where('expires_at', '>', $datetime)->limit(5);
},
'user' => function ($query) {
return $query->withTrashed();
},
'topics' => function ($query) {
return $query->select('id', 'name');
},
])
->orderBy('id', 'desc')
->limit($limit)
->get();
Expand Down

0 comments on commit 1d8f9ce

Please sign in to comment.