original_string: protected function detachUsingCustomClass($ids)
      {
          $results = 0;
  
          foreach ($this->parseIds($ids) as $id) {
              $results += $this->newPivot([
                  $this->foreignPivotKey => $this->parent->{$this->parentKey},
                  $this->relatedPivotKey => $id,
              ], true)->delete();
          }
  
          return $results;
      }
code: protected function detachUsingCustomClass($ids)
      {
          $results = 0;
  
          foreach ($this->parseIds($ids) as $id) {
              $results += $this->newPivot([
                  $this->foreignPivotKey => $this->parent->{$this->parentKey},
                  $this->relatedPivotKey => $id,
              ], true)->delete();
          }
  
          return $results;
      }
code_tokens: protected function detachUsingCustomClass ( $ ids ) { $ results = 0 ; foreach ( $ this -> parseIds ( $ ids ) as $ id ) { $ results += $ this -> newPivot ( [ $ this -> foreignPivotKey => $ this -> parent -> { $ this -> parentKey } , $ this -> relatedPivotKey => $ id , ] , true ) -> delete ( ) ; } return $ results ; }
docstring: Detach models from the relationship using a custom class.
  
  @param  mixed  $ids
  @return int
docstring_tokens: Detach models from the relationship using a custom class .