@extends('layouts.app') @section('title','Leaderboard') @section('content') {{-- Tab Filter --}}
{{-- All Time --}}
{{-- Top 3 podium --}}
@if($allTime->count() >= 2)
{{ Str::limit($allTime[1]->name,10) }}
{{ number_format($allTime[1]->total_earned_points) }}
🥈
@endif @if($allTime->count() >= 1)
{{ Str::limit($allTime[0]->name,10) }}
{{ number_format($allTime[0]->total_earned_points) }}
🥇
@endif @if($allTime->count() >= 3)
{{ Str::limit($allTime[2]->name,10) }}
{{ number_format($allTime[2]->total_earned_points) }}
🥉
@endif
{{-- Rest of list --}}
@foreach($allTime->slice(3) as $i => $u)
{{ $i+4 }}
{{ $u->name }} @if($u->id===auth()->id()) (You)@endif
{{ number_format($u->total_earned_points) }} pts
{{ $u->level }}
@endforeach
{{-- Weekly --}} {{-- My Rank Box --}}
Your Global Rank
#{{ $myRank }}
{{ number_format(auth()->user()->total_earned_points) }} total points earned
@endsection @push('scripts') @endpush