protected function attachUsingCustomClass($id, array $attributes)
    {
        $records = $this->formatAttachRecords(
            $this->parseIds($id), $attributes
        );

        foreach ($records as $record) {
            $this->newPivot($record, false)->save();
        }
    }
protected function attachUsingCustomClass($id, array $attributes)
    {
        $records = $this->formatAttachRecords(
            $this->parseIds($id), $attributes
        );

        foreach ($records as $record) {
            $this->newPivot($record, false)->save();
        }
    }
protected function attachUsingCustomClass ( $ id , array $ attributes ) { $ records = $ this -> formatAttachRecords ( $ this -> parseIds ( $ id ) , $ attributes ) ; foreach ( $ records as $ record ) { $ this -> newPivot ( $ record , false ) -> save ( ) ; } }
Attach a model to the parent using a custom class.

@param  mixed  $id
@param  array  $attributes
@return void
Attach a model to the parent using a custom class .