Filling a SpatieMediaLibraryImageEntry field programmatically on a new Model (not saved yet)
I'm trying to set up a "cloning" functionality where the user can pick an existing Item and make a copy that he can edit before saving it as his own
I made a copy of the
So far so good, but my Items also have images attached, via the SpatieMediaLibrary plugin, and I can't find a way to bring the original item's images in the form
I thought about persisting the item to the database and then using the
Any other way to auto-fill that field from existing images (that would then have to be copied over to new Model as well)?
I made a copy of the
CreateRecord page that accept an extra param (the ID of the item to be cloned) and added thisSo far so good, but my Items also have images attached, via the SpatieMediaLibrary plugin, and I can't find a way to bring the original item's images in the form
I thought about persisting the item to the database and then using the
EditRecord page but that would be extra clutter in case the user doesn't actually save his item anymoreAny other way to auto-fill that field from existing images (that would then have to be copied over to new Model as well)?