Ranking: Rank Number Column
This commit is contained in:
parent
c4973664b9
commit
92a07b1684
4 changed files with 37 additions and 2 deletions
|
|
@ -65,6 +65,11 @@ class UsersController extends Controller
|
|||
public function store() {
|
||||
if (Auth::guest()) { return redirect("/"); }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$season_id = Season::getCurrent()->id;
|
||||
|
||||
|
||||
|
|
@ -163,6 +168,12 @@ class UsersController extends Controller
|
|||
usort($arr, array($this,"cmp"));
|
||||
$users=$arr;
|
||||
|
||||
$rank=1;
|
||||
foreach($users as $user) {
|
||||
$user->rank =$rank;
|
||||
$rank +=1;
|
||||
}
|
||||
|
||||
$round=Round::where('id','=',$round_id)->first();
|
||||
$games=Game::where('round_id','=',$round->id)->get();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue