src/Traits/HandlesEloquentRelationManipulationTrait.php
public function attach(Model $model, $relation, $id, array $attributes = array(), $touch = true)
    {
        return $model->{$relation}()->attach($id, $attributes, $touch);
    }
public function attach(Model $model, $relation, $id, array $attributes = array(), $touch = true)
    {
        return $model->{$relation}()->attach($id, $attributes, $touch);
    }
public function attach ( Model $ model , $ relation , $ id , array $ attributes = array ( ) , $ touch = true ) { return $ model -> { $ relation } ( ) -> attach ( $ id , $ attributes , $ touch ) ; }
Executes an attach on the model provided

@param  Model $model
@param  string   $relation name of the relation (method name)
@param  int      $id
@param  array    $attributes
@param  boolean  $touch
Executes an attach on the model provided