I want to use the function getClientOriginalName()
for making a new name for the photo I take from the user. But as I said before, it displays an error that says that this function is undefined.
$pic = $request->photo;
$newPic = time().$pic.getClientOriginalName();