Skip to content
Snippets Groups Projects
Unverified Commit cdf168aa authored by Maxime FRIESS's avatar Maxime FRIESS :blue_heart:
Browse files

[user] Fixed rank order by

parent fce041fb
Branches
Tags
No related merge requests found
Pipeline #107174 passed with stages
in 1 minute
......@@ -112,6 +112,6 @@ public function connecting(Server $server, string $token)
}
public function getRankAttribute() {
return User::select('id')->orderByDesc('rank')->pluck('id')->search($this->id) + 1;
return User::select('id')->orderByDesc('elo')->orderBy('id')->pluck('id')->search($this->id) + 1;
}
}
......@@ -31,5 +31,6 @@ class UserGame extends Pivot
protected $fillable = [
'team_id',
'rank',
'elo',
];
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment