diff --git a/app/Http/Livewire/TopUsers.php b/app/Http/Livewire/TopUsers.php index e9464fbee8..283f049e13 100644 --- a/app/Http/Livewire/TopUsers.php +++ b/app/Http/Livewire/TopUsers.php @@ -139,7 +139,7 @@ final public function commenters(): \Illuminate\Support\Collection ->where('user_id', '!=', User::SYSTEM_USER_ID) ->where('anon', '=', false) ->groupBy('user_id') - ->orderByRaw('COALESCE(value, 0) DESC') + ->orderByDesc('value') ->take(8) ->get(); } @@ -154,7 +154,7 @@ final public function posters(): \Illuminate\Support\Collection ->select(DB::raw('user_id, COUNT(user_id) as value')) ->where('user_id', '!=', User::SYSTEM_USER_ID) ->groupBy('user_id') - ->orderByRaw('COALESCE(value, 0) DESC') + ->orderByDesc('value') ->take(8) ->get(); } @@ -169,7 +169,7 @@ final public function thankers(): \Illuminate\Support\Collection ->select(DB::raw('user_id, COUNT(user_id) as value')) ->where('user_id', '!=', User::SYSTEM_USER_ID) ->groupBy('user_id') - ->orderByRaw('COALESCE(value, 0) DESC') + ->orderByDesc('value') ->take(8) ->get(); }