mirror of
https://repo.getmonero.org/AnonDev/xmrmemes.git
synced 2025-05-04 18:44:56 -04:00
Add tips count to leaderboard
Also rename memes_total to memes_count to make it more consistent
This commit is contained in:
parent
bb8ee230a6
commit
4c1b493943
4 changed files with 12 additions and 5 deletions
|
@ -40,7 +40,7 @@ class MemeController extends Controller
|
|||
public function leaderboard()
|
||||
{
|
||||
SEOTools::setTitle('Leaderboard');
|
||||
$users = User::with('tips')->has('memes')->get();
|
||||
$users = User::with('tips')->withCount('tips')->has('memes')->get();
|
||||
$users = $users->sortByDesc(function($user) {
|
||||
return $user->tips_total;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue