public function duplicate($model, $relation = null) {
		$clone = $this->cloneModel($model);
		$this->duplicateAttachments($clone);
		$this->saveClone($clone, $relation, $model);
		$this->cloneRelations($model, $clone);
		return $clone;
	}
public function duplicate($model, $relation = null) {
		$clone = $this->cloneModel($model);
		$this->duplicateAttachments($clone);
		$this->saveClone($clone, $relation, $model);
		$this->cloneRelations($model, $clone);
		return $clone;
	}
public function duplicate ( $ model , $ relation = null ) { $ clone = $ this -> cloneModel ( $ model ) ; $ this -> duplicateAttachments ( $ clone ) ; $ this -> saveClone ( $ clone , $ relation , $ model ) ; $ this -> cloneRelations ( $ model , $ clone ) ; return $ clone ; }
Clone a model instance and all of it's files and relations

@param  Illuminate\Database\Eloquent\Model $model
@param  Illuminate\Database\Eloquent\Relations\Relation $relation
@return Illuminate\Database\Eloquent\Model The new model instance
Clone a model instance and all of it s files and relations