Can you show us your HTML code?
Laravel accessing file uploads in nested form data array
I posted this on SO but not getting much help and just realised this is a much better place to ask or so I hope as this is doing my head in at the moment.
I need to build a form that allows multiple file uploads and also allows repeatable form groups. The form group that can be repeated contains upload fields which can be dynamically added too e.g add another file functionality.
One thing I can't figure out is how I can access the uploaded files if they're nested in an array in the request i.e Request::file('upload'); won't work and Request::input('request') won't contain the upload information.
Here's an example of the HTML of the file input and you can see the level of nesting that's going on.
<input class="js-file-input" name="request[0]files[]" type="file" />
The request index is incremented for each new form group that's added to build up a list of requests made by a user on the app.
Any help would be greatly appreciated. Thanks!
Please or to participate in this conversation.