+ public function setStreamLink(Request $request, User $user) {
+ $this->authorize('setStreamLink', $user);
+
+ $validatedData = $request->validate([
+ 'stream_link' => 'required|url',
+ ]);
+
+ $user->stream_link = $validatedData['stream_link'];
+ $user->update();
+
+ UserChanged::dispatch($user);
+
+ return $user->toJson();
+ }
+
+ public function single(Request $request, $id) {
+ $user = User::findOrFail($id);
+ $this->authorize('view', $user);
+ $user->load('participation');
+ $user->load('participation.tournament');
+ return $user->toJson();
+ }
+