mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-01 07:52:00 -05:00
add: upload snatches statistic
This commit is contained in:
@@ -561,6 +561,14 @@ class User extends Authenticatable
|
||||
return $this->hasMany(FailedLoginAttempt::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Has many upload snatches.
|
||||
*/
|
||||
public function uploadSnatches(): \Illuminate\Database\Eloquent\Relations\HasManyThrough
|
||||
{
|
||||
return $this->hasManyThrough(History::class, Torrent::class)->whereNotNull('completed_at');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Users accepts notification as bool.
|
||||
*/
|
||||
|
||||
@@ -372,6 +372,7 @@ return [
|
||||
'unsatisfieds' => 'Unsatisfieds',
|
||||
'upload-bon' => 'Upload Added from BON Store',
|
||||
'upload-recorded' => 'Recorded Upload',
|
||||
'upload-snatches' => 'Upload Snatches',
|
||||
'upload-true' => 'True Upload',
|
||||
'uploads' => 'Uploads',
|
||||
'uploads-table' => 'Uploads Table',
|
||||
|
||||
@@ -692,7 +692,9 @@
|
||||
<dt>{{ __('user.thanks-received') }}</dt>
|
||||
<dd>{{ $user->thanksReceived()->count() }}</dd>
|
||||
<dt>{{ __('user.thanks-given') }}</dt>
|
||||
<dd> {{ $user->thanksGiven()->count() }}</dd>
|
||||
<dd>{{ $user->thanksGiven()->count() }}</dd>
|
||||
<dt>{{ __('user.upload-snatches') }}</dt>
|
||||
<dd>{{ $user->uploadSnatches()->count() }}</dd>
|
||||
</dl>
|
||||
</section>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user