I have this code in laravel to store an image but why does the image name change when I checked it on the folder ?! Please help me I'm really frustrated !
public function postStore(Request $req){//Bikin toko baru
$req->image->store('images','public');
$req->validate([
'name'=>['string','min:5'],
'address'=>['string','min:10'],
'description'=>['string','min:20']
// 'image'=>'mimes:jpg,png,jpeg'
]);
please try this
$path = $request->file('image')->storeAs(
'images', $request->file('image')->getClientOriginalName()
);