Closed mikimaine closed 8 years ago
For what I have learned about the module, you can add an additional class to store them like a gallery.
user -> user_images
With only id, user_id
fields (for example) to make the user_images
model. Then add the image parameter to that model and will work as an array of images.
Also, just found this library that works over laravel-stapler that could be just what you need https://github.com/benallfree/laravel-stapler-images
You need to create another table (call it product_images) that belongsTo
a product. That's the model (ProductImage) that you want to define your stapler attachments on. Then, you'll be able to associate many product images to a single product.
There are examples of how to do this already in the docs and here's another example from Stackoverflow that also show how to do this type of thing.
Also, just updated a library that automatices the multiuploading and multiple file handling https://github.com/Patroklo/laravel-multiple-stapler
i want to add multiple image for a single product?
doesnt accept array of images?