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.
brokeyourbike/has-source-model adds a lightweight HasSourceModel trait that ties any Eloquent model back to the model it originated from through a polymorphic source relationship. Rather than duplicating foreign keys or adding ad-hoc columns, records store their origin as a single morph pair, and the trait exposes convenient helpers and scopes for traversing that link.
source() relation available out of the boxHow can I help you explore Laravel packages today?