Retrieving Uploaded Files
You may access uploaded files that are included with the IlluminateHttpRequest instance using the file method. The object returned by the file method is an instance of the SymfonyComponentHttpFoundationFileUploadedFile class, which extends the PHP SplFileInfo class and provides a variety of methods for interacting with the file:
You may also determine if a file is present on the request using the hasFile method:
Validating Successful Uploads
In addition to checking if the file is present, you may verify that there were no problems uploading the file via the isValid method:
Moving Uploaded Files
To move the uploaded file to a new location, you should use the move method. This method will move the file from its temporary upload location (as determined by your PHP configuration) to a more permanent destination of your choosing:
Other File Methods
There are a variety of other methods available on UploadedFile instances. Check out the API documentation for the class for more information regarding these methods.