With the following code I save the file with a unique name. That's awesome, except I want it perfect. I rather see the image with a name like: path/to/file/name-of-the-file.jpg and if there's a new one with the same name I like it to be: path/to/file/name-of-the-file-2.jpg instead of a unique "hash" in front.
$path = $request->image->storeAs('themes', uniqid().'-'.$request->image->getClientOriginalName(), 'public');
Is there a way to extend / overwrite the class "UploadFile.php" and add an extra method to this? So I can add method like: storeAsUnique()
I can see it's called within /vendor/laravel/framework/src/Illuminate/Http/Concerns/InteractsWithInput.php on line 251 (in laravel 5.4).
I don't see how to extend this class.