Skip to content

Commit

Permalink
fix(news): 修复资讯排行榜无用户头像返回
Browse files Browse the repository at this point in the history
zhiyicx/thinksns-plus-android#2377
  • Loading branch information
medz committed Sep 19, 2018
1 parent 33eda40 commit 2629ce3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function index(Request $request, News $newsModel, Carbon $datetime)
->where('created_at', '>', $date)
->where('audit_status', 0)
->with(['user' => function ($query) {
return $query->select('id', 'name', 'sex')->withTrashed();
return $query->select('id', 'name', 'sex', 'avatar')->withTrashed();
}])
->groupBy('user_id')
->orderBy('count', 'desc')
Expand Down

0 comments on commit 2629ce3

Please sign in to comment.