getKeyName(), $this->getCreatedAtColumn(), $this->getUpdatedAtColumn(), ]; $attributes = Arr::except( $this->attributes, $except ? array_unique(array_merge($except, $defaults)) : $defaults ); $attributes = array_merge($attributes, $with ?? []); return tap(new $model, function ($instance) use ($attributes) { $instance->setRawAttributes($attributes); $instance->setRelations($this->relations); $instance->fireModelEvent('replicating', false); }); } }