Good morning or good evening (it depends whenever you read this topic).
I wrote this code using angular and laravel to upload multiple files, but what i get from the req
Laravel has store
function use this
foreach ($request->file as $file) {
$filename = $file->store('folder');
}
Here folder
is storage/app/folder
You need to change in FormData
like this, you have to add file[]
array in FormData
for (let i = 0; i < obj.file.length; i++) {
let f = obj.file[i];
fd.append('file[]', f);
}