diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index afb01a18c6..c1be408ce6 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -52,7 +52,7 @@ class UserController extends Controller */ public function show($username) { - $user = User::with(['privacy', 'history'])->where('username', '=', $username)->firstOrFail(); + $user = User::with(['privacy', 'history'])->withCount('torrents')->where('username', '=', $username)->firstOrFail(); $groups = Group::all(); $followers = Follow::where('target_id', '=', $user->id)->latest()->limit(25)->get(); diff --git a/resources/views/user/profile.blade.php b/resources/views/user/profile.blade.php index 706638b752..84e66b1051 100644 --- a/resources/views/user/profile.blade.php +++ b/resources/views/user/profile.blade.php @@ -140,7 +140,7 @@ class="{{ config('other.font-awesome') }} fa-trash"> @lang('user.delete')