call to a member function move 28 29 on string

Solutions on MaxInterview for call to a member function move 28 29 on string by the best coders in the world

showing results for - "call to a member function move 28 29 on string"
David
06 Feb 2016
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