Laravel - File Storage - Other Uploaded File Information
If you would like to get the original name of the uploaded file, you may do so using the getClientOriginalName
method:
$name = $request->file('avatar')->getClientOriginalName();
The extension
method may be used to get the file extension of the uploaded file:
$extension = $request->file('avatar')->extension();