original_string: public function update(ProfileRequest $request, User $user)
      {
          event(new ProfileWasUpdated($request));
  
          if ($request->wantsJson()) {
              return $this->respondsWithSuccess('ok');
          }
  
          return back();
      }
code: public function update(ProfileRequest $request, User $user)
      {
          event(new ProfileWasUpdated($request));
  
          if ($request->wantsJson()) {
              return $this->respondsWithSuccess('ok');
          }
  
          return back();
      }
code_tokens: public function update ( ProfileRequest $ request , User $ user ) { event ( new ProfileWasUpdated ( $ request ) ) ; if ( $ request -> wantsJson ( ) ) { return $ this -> respondsWithSuccess ( 'ok' ) ; } return back ( ) ; }
docstring: Updates the user profile.
  
  @param  ProfileRequest $request
  @param  User $user
  
  @return void
docstring_tokens: Updates the user profile .