the form probably does not have a field called homopageimage
$image = $request->file('homeopageimage');
where is your validation?
Getting this error while updating home page image. Very strangely similar code is working fine for upload of site logo ?
public function HomeImageUpdate(Request $request){
$old_image = $request->old_image;
If ($old_image <> NULL) unlink("images/logos/".$old_image);
$image = $request->file('homeopageimage');
$name_gen = hexdec(uniqid()).'.'.$image->getClientOriginalExtension();
Image::make($image)->save('images/logos/'.$name_gen);
Logo::findOrFail(1)->update([
'homepageimage' => $name_gen,
]);
$notification = array(
'message' => 'Site Image Updated Successfully',
'alert-type' => 'success'
);
return redirect()->back()->with($notification);
} // end method
the form probably does not have a field called homopageimage
$image = $request->file('homeopageimage');
where is your validation?
Please or to participate in this conversation.