neurony / laravel-duplicate

Duplicate any Eloquent model along with its underlying relationships
MIT License
122 stars 27 forks source link

Include only relations #3

Closed rentalhost closed 5 years ago

rentalhost commented 5 years ago

Hello.

I like to suggest you to create a way to include only specified relations, so I can specify that I wants to duplicate user, for instance, with phones and addresses only. Even for future new relations, it will just be added to duplication rule if you manually set it.

Thanks!

zbiller commented 5 years ago

Hi @rentalhost

I think what you're asking will come into conflict with the current exclusion logic of relations.

This package's goal is to make it easy to deep duplicate a model record (meaning relations included).

If you have a suggestion on how to implement this without getting people confused what to use (include/exclude) please let me know.

Thanks!