brokeyourbike/has-source-model
A lightweight Laravel trait that gives any Eloquent model a polymorphic "source" relationship, letting you track and retrieve the record or model a row originated from with minimal setup.
HasSourceModel trait implies a reusable way to answer "where did this record come from?" (import, external system, upstream entity, user action). That underpins features like source filtering, import reconciliation, duplicate detection, and "origin" badges in admin UI.morphTo/belongsTo relation and a migration convention. For most teams this is a few hours of first-party code, which is cheaper than owning an external dependency's upgrade cadence — especially given the v3.0.0 signal below.To executives (one line): This is a small open-source helper for tracking where each record in our system came from — useful for import reconciliation and support tooling, but the latest release is a breaking change published without usable release notes, so the recommendation is to defer adoption or implement the equivalent ourselves rather than take on an unmanaged dependency.
To engineering: The package gives us a HasSourceModel trait for polymorphic source attribution. Functionally it is close to something we could own in a day. The blocker is v3.0.0: a major bump whose changelog does not describe what broke, so anyone upgrading has to read the diff. If we adopt, pin the tag, wrap the trait behind our own interface, and review the v2→v3 commit range first. If we only need one or two models to carry a source, write it ourselves and skip the dependency entirely.
Recommendation: No adoption decision on this release alone. Build in-house if the need is narrow (likely the cheaper path); revisit the package only if the maintainer publishes a real migration guide and the API stabilizes across a minor cycle.
How can I help you explore Laravel packages today?