X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FHttp%2FControllers%2FUserController.php;h=692c45862feb0e21186862476cf9ff5a76e31bc8;hb=2ab05ab7927e8b21887ffa42d04eb9d4ff899382;hp=c0ab73d9b442a30ff340375e97d4747b0e5e9a5f;hpb=920f11ddfeb2175e4e1556886773dcd044c6085b;p=alttp.git diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index c0ab73d..692c458 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -41,6 +41,14 @@ class UserController extends Controller public function single(Request $request, $id) { $user = User::findOrFail($id); $this->authorize('view', $user); + $user->load('participation'); + $user->load('participation.tournament'); + $user->loadCount('round_first'); + $user->loadCount('round_second'); + $user->loadCount('round_third'); + $user->loadCount('tournament_first'); + $user->loadCount('tournament_second'); + $user->loadCount('tournament_third'); return $user->toJson(); }