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;
    }
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;
    }
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 ; }
Update an existing pivot record on the table via a custom class.

@param  mixed  $id
@param  array  $attributes
@param  bool   $touch
@return int
Update an existing pivot record on the table via a custom class .