Rename image name in src path I saving files using the save () method and the image has the name like qwewerwasdfasdfasdfasdf.jpg
For SEO reasons, want to make in blade path more human and was rename picture like user-> firstName. user-> lastName.jpg
How to do it?
Thx
Docs;
Specifying A File Name
If you would not like a file name to be automatically assigned to your stored file, you may use the storeAs method, which receives the path, the file name, and the (optional) disk as its arguments:
$path = $request->file('avatar')->storeAs(
'avatars', $request->user()->id
);
Hmmm,
yes but I need rewrite saved file qwewerwasdfasdfasdfasdf.jpg in blade to
scr="userName".
what you should do is name a file when saving it
Please sign in or create an account to participate in this conversation.