I am uploading an image file to the input file ImageUpload.I need to check if file has been uploaded then create a unique filename and save it on the server.
$file = $request->file('ImageUpload');
$filename=uniqid($user->id . '_' ).".".$file->getClientOriginalExtension();
Storage::disk('public')->put($filename,File::get($file));