code: public function register(Request $request)
      {
          $this->validator($request->all())->validate();
  
          event(new Registered($user = $this->create($request->all())));
  
          $this->sendConfirmationToUser($user);
  
          return $this->registered($request, $user)
              ?: redirect($this->redirectAfterRegistrationPath())->with('confirmation', __('confirmation::confirmation.confirmation_info'));
      }
docs: Handle a registration request for the application.
  
  @param  \Illuminate\Http\Request  $request
  @return \Illuminate\Http\Response