xedi/eloquent-sync
xedi/eloquent-sync is a Laravel package for keeping Eloquent models synchronized with external systems. It helps map model data, push and pull changes, and keep local records consistent with remote sources, reducing custom integration boilerplate for sync workflows.
sync() semantics for hasMany relationships—maps directly to user-facing features like "move all open tasks to a new owner," "reassign comments/projects between accounts," "bulk re-categorize line items," or "merge two customers." Today Laravel ships sync() only for belongsToMany; teams routinely hand-roll the hasMany equivalent, and this package is a reference implementation of that pattern.update(['fk_id' => ...]) calls across the codebase.Consider it (or its pattern) when:
hasMany reassignment semantics and Laravel's native belongsToMany::sync() doesn't apply because the relationship has no pivot table.Look elsewhere — or build internally — when:
For executives (one line): A tiny open-source helper that solves a real but narrow data problem — moving child records between parents — but it's unmaintained and unproven, so we should borrow the idea, not the dependency.
Summary for engineering and leadership:
sync()-style behavior to hasMany relationships, letting you efficiently re-assign a collection of child records to a new parent in one operation.How can I help you explore Laravel packages today?