protected function duplicateRelation($model, $relation_name, $clone) {
		$relation = call_user_func([$model, $relation_name]);
		if (is_a($relation, 'Illuminate\Database\Eloquent\Relations\BelongsToMany')) {
			$this->duplicatePivotedRelation($relation, $relation_name, $clone);
		} else $this->duplicateDirectRelation($relation, $relation_name, $clone);
	}
protected function duplicateRelation($model, $relation_name, $clone) {
		$relation = call_user_func([$model, $relation_name]);
		if (is_a($relation, 'Illuminate\Database\Eloquent\Relations\BelongsToMany')) {
			$this->duplicatePivotedRelation($relation, $relation_name, $clone);
		} else $this->duplicateDirectRelation($relation, $relation_name, $clone);
	}
protected function duplicateRelation ( $ model , $ relation_name , $ clone ) { $ relation = call_user_func ( [ $ model , $ relation_name ] ) ; if ( is_a ( $ relation , 'Illuminate\Database\Eloquent\Relations\BelongsToMany' ) ) { $ this -> duplicatePivotedRelation ( $ relation , $ relation_name , $ clone ) ; } else $ this -> duplicateDirectRelation ( $ relation , $ relation_name , $ clone ) ; }
Duplicate relationships to the clone

@param  Illuminate\Database\Eloquent\Model $model
@param  string $relation_name
@param  Illuminate\Database\Eloquent\Model $clone
@return void
Duplicate relationships to the clone