@ayzerobug Model relations should be named with camelCase, i.e. externalReferences instead of external_references.
New Laravel Package
Hello fellow artisans, I've developed a Laravel package called "laravel-external-references" designed to help you manage your external IDs or identifiers effectively. I'd love to hear your thoughts on it!
So working on a project, whereby your Model has an identifier in an external system. Maybe be a payment system like Paystack or Stripe Instead of adding columns like stipe_id paystack_id to the columns in the model table which will make the table untidy, this package will help you by putting all the external references in a dedicated table. And you’ll be able to fetch the model with the external id or even get the external id of the model.
Please or to participate in this conversation.