Upload multiple images to a model
I have a
I'm storing the images in an
How do I allow the user to upload images and have them associated to the
Project model and I want the user to be able to upload many images for each project.I'm storing the images in an
images table.How do I allow the user to upload images and have them associated to the
Project model being created?Solution
If you use multiple() Filament expects the file paths to be saved in a json array on the model. If you want to use a morph relationship, you will want to use a relation manager or write some custom logic that will use the array, create and attach the related models, unset the data on the original model, etc.