protected function saveClone($clone, $relation = null, $src, $child = null) {

		// Set the child flag
		if ($relation) $child = true;

		// Notify listeners via callback or event
		if (method_exists($clone, 'onCloning')) $clone->onCloning($src, $child);
		$this->events->dispatch('cloner::cloning: '.get_class($src), [$clone, $src]);

		// Do the save
		if ($relation) $relation->save($clone);
		else $clone->save();

		// Notify listeners via callback or event
		if (method_exists($clone, 'onCloned')) $clone->onCloned($src);
		$this->events->dispatch('cloner::cloned: '.get_class($src), [$clone, $src]);
	}
protected function saveClone($clone, $relation = null, $src, $child = null) {

		// Set the child flag
		if ($relation) $child = true;

		// Notify listeners via callback or event
		if (method_exists($clone, 'onCloning')) $clone->onCloning($src, $child);
		$this->events->dispatch('cloner::cloning: '.get_class($src), [$clone, $src]);

		// Do the save
		if ($relation) $relation->save($clone);
		else $clone->save();

		// Notify listeners via callback or event
		if (method_exists($clone, 'onCloned')) $clone->onCloned($src);
		$this->events->dispatch('cloner::cloned: '.get_class($src), [$clone, $src]);
	}
protected function saveClone ( $ clone , $ relation = null , $ src , $ child = null ) { // Set the child flag if ( $ relation ) $ child = true ; // Notify listeners via callback or event if ( method_exists ( $ clone , 'onCloning' ) ) $ clone -> onCloning ( $ src , $ child ) ; $ this -> events -> dispatch ( 'cloner::cloning: ' . get_class ( $ src ) , [ $ clone , $ src ] ) ; // Do the save if ( $ relation ) $ relation -> save ( $ clone ) ; else $ clone -> save ( ) ; // Notify listeners via callback or event if ( method_exists ( $ clone , 'onCloned' ) ) $ clone -> onCloned ( $ src ) ; $ this -> events -> dispatch ( 'cloner::cloned: ' . get_class ( $ src ) , [ $ clone , $ src ] ) ; }
Save the clone. If a relation was passed, save the clone onto that
relation.  Otherwise, just save it.

@param  Illuminate\Database\Eloquent\Model $clone
@param  Illuminate\Database\Eloquent\Relations\Relation $relation
@param  Illuminate\Database\Eloquent\Model $src The orginal model
@param  boolean $child
@return void
Save the clone . If a relation was passed save the clone onto that relation . Otherwise just save it .