public function pivotAttributes(array $pivotAttributes)
    {
        foreach ($pivotAttributes as $relatedClass => $attributes) {
            $this->pivotPopulators[$relatedClass]->setCustomAttributes($attributes);
        }

        return $this;
    }
public function pivotAttributes(array $pivotAttributes)
    {
        foreach ($pivotAttributes as $relatedClass => $attributes) {
            $this->pivotPopulators[$relatedClass]->setCustomAttributes($attributes);
        }

        return $this;
    }
public function pivotAttributes ( array $ pivotAttributes ) { foreach ( $ pivotAttributes as $ relatedClass => $ attributes ) { $ this -> pivotPopulators [ $ relatedClass ] -> setCustomAttributes ( $ attributes ) ; } return $ this ; }
Set custom attributes that will override the formatters of the extra attributes of pivot tables.

@param  array $pivotAttributes The attribute arrays indexed by related model class name.
@return static
Set custom attributes that will override the formatters of the extra attributes of pivot tables .