all(); if (isset($input['uuid'])) { try { $username = $input['uuid']; $input['uuid'] = UUID::toUUID($username); } catch(\InvalidArgumentException $iae) { report($iae); $request->session()->flash('error', $iae->getMessage()); return redirect(route('register')); } $request->replace($input); } return $next($request); } }