original_string: protected function updateExistingPivotUsingCustomClass($id, array $attributes, $touch)
      {
          $updated = $this->newPivot([
              $this->foreignPivotKey => $this->parent->{$this->parentKey},
              $this->relatedPivotKey => $this->parseId($id),
          ], true)->fill($attributes)->save();
  
          if ($touch) {
              $this->touchIfTouching();
          }
  
          return (int) $updated;
      }
code: protected function updateExistingPivotUsingCustomClass($id, array $attributes, $touch)
      {
          $updated = $this->newPivot([
              $this->foreignPivotKey => $this->parent->{$this->parentKey},
              $this->relatedPivotKey => $this->parseId($id),
          ], true)->fill($attributes)->save();
  
          if ($touch) {
              $this->touchIfTouching();
          }
  
          return (int) $updated;
      }
code_tokens: protected function updateExistingPivotUsingCustomClass ( $ id , array $ attributes , $ touch ) { $ updated = $ this -> newPivot ( [ $ this -> foreignPivotKey => $ this -> parent -> { $ this -> parentKey } , $ this -> relatedPivotKey => $ this -> parseId ( $ id ) , ] , true ) -> fill ( $ attributes ) -> save ( ) ; if ( $ touch ) { $ this -> touchIfTouching ( ) ; } return ( int ) $ updated ; }
docstring: Update an existing pivot record on the table via a custom class.
  
  @param  mixed  $id
  @param  array  $attributes
  @param  bool   $touch
  @return int
docstring_tokens: Update an existing pivot record on the table via a custom class .