wantsJson() ? new JsonResponse('', 201) : redirect()->intended(Fortify::redirects('register')); } }