LMongo\Eloquent\Model::replicate PHP Méthode

replicate() public méthode

Clone the model into a new, non-existing instance.
public replicate ( ) : Model
Résultat Model
    public function replicate()
    {
        $attributes = array_except($this->attributes, array($this->getKeyName()));
        with($instance = new static())->setRawAttributes($attributes);
        return $instance->setRelations($this->relations);
    }
Model