blob: 4116fcfa280944d7ff13868ac9a7d8450c7da2bb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
<?php
use HebrewParseTrainer\User;
$users = User::where('isadmin', false)
->orderBy('points', 'desc')
->take(3)
->get();
?>
@if(count($users) > 0)
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Top contributors</h3>
</div>
<div class="panel-body">
<table class="table table-hover">
<thead>
<tr>
<th></th>
<th>Name</th>
<th>Points</th>
</tr>
</thead>
<tbody>
@foreach($users as $user)
<tr>
<td><img src="https://gravatar.com/avatar/{{ md5(strtolower(trim($user->email))) }}?s=40"/></td>
<td>{{{ $user->name }}}</td>
<td>{{{ $user->points }}}</td>
</tr>
@endforeach
</tbody>
</table>
@if(Auth::check())
<p>You have {{ Auth::user()->points }} points.</p>
@endif
</div>
</div>
@endif
|