1 public function fileUpload(Request $request)
2 {
3 if ($request->hasfile('filenames')) {
4 foreach ($request->file('filenames') as $file) {
5 $name = $file->getClientOriginalName();
6 $file->move(public_path() . '/mytestfile/', $name);
7 $data[] = $name;
8 }
9 return back()->with('Success!','Data Added!');
10 }
11 }
12