1if ($request->hasFile('file')) {
2 $destinationPath = 'path/th/save/file/';
3 $files = $request->file('file'); // will get all files
4
5 foreach ($files as $file) {//this statement will loop through all files.
6 $file_name = $file->getClientOriginalName(); //Get file original name
7 $file->move($destinationPath , $file_name); // move files to destination folder
8 }
9}
10