alariva/modelmerge
Laravel package for merging duplicate Eloquent models. Move attributes and relationships from a source model into a target, then delete the obsolete record. Configurable merge behavior, events, transactions, and support for custom models.
HasMany/BelongsToMany/morph relations, unique constraints, model events, and soft deletes.Look elsewhere or build in-house when:
To executives: This is a low-cost, MIT-licensed accelerator for data-quality features like duplicate-record cleanup. It can help validate and ship a merge workflow faster, but adoption risk is real: very low community traction means we should treat it as a starter/reference component, not a production-critical dependency without hardening. Recommend a time-boxed spike, not a broad platform commitment.
To engineering: The package offers focused Eloquent merge behavior that can cut boilerplate around relation reassignment and record consolidation. Before relying on it, audit the code, confirm Laravel version compatibility, vendor/fork it, and add integration tests around transactions, unique constraints, events, soft deletes, and relation edge cases. Define merge policy explicitly—surviving record, field precedence, audit logging—rather than letting package defaults become product behavior.
How can I help you explore Laravel packages today?