Reputation: 2639
I have this input in my view:
<input type="file" name="slide[]">
<button type="button" ng-click="addSlide()">Add new</button>
Now I need to get the array of uploaded files but if I do:
dd($request->file('slide'));
It's only retrieving me the first one.
How can I access them?
Upvotes: 1
Views: 4592
Reputation: 7447
Try adding the multiple
attribute to the file tag.
<input type="file" name="slide[]" multiple>
<button type="button" ng-click="addSlide()">Add new</button>
Upvotes: 2