October\Rain\Database\Concerns\HasReplication

Overview

HasReplication for a model


Public Methods

public duplicateWithRelations()

public duplicateWithRelations(array|null $except = null): static 

duplicateWithRelations replicates a model with special multisite duplication logic. To avoid duplication of has many relations, the logic only propagates relations on the parent model since they are shared via site_root_id beyond this point.

public newReplicationInstance()

public newReplicationInstance($attributes): void

newReplicationInstance returns a new instance used by the replicator

public replicateWithRelations()

public replicateWithRelations(array|null $except = null): static 

replicateWithRelations replicates the model into a new, non-existing instance, including replicating relations.