'required|string|max:255', 'lastname' => 'required|string|max:255', 'email' => 'required|string|email|max:255|unique:users,email', ]; } public function handle(ActionRequest $request): JsonResponse { User::create([ ...$request->validated(), 'password' => Hash::make(str()->random(32)), ]); Password::broker()->sendResetLink( $request->safe()->only('email'), fn ($user, $token) => Mail::to($user)->send(new WelcomeMail($user, $token)) ); return response()->json([]); } }