John Davidson

php - Laravel 8 - Can't write image data to path

0 comments
Message:


My Project Works Perfectly On Local Server But After I Have Upload It To Public Server. All Add Images Functions Give Me Same Error


Can't write image data to the path (upload/... I Am Using Laravel 8


here is my code when i add Service image


    if($request->hasFile('himage')) {

$image=$request->file('himage');

$imageName='service_header_'.$id.'.'.time().'.'.$image->getClientOriginalExtension();

Image::make($image)->save('uploads/service/'.$imageName);



OurService::where('service_id',$id)->update([

'header_image'=>$imageName,

'updated_at'=>Carbon::now()->toDateTimeString(),

]);

}



if($update){

return redirect('admin/service/edit/'.$slug)->with('success', 'Service Update Successfully!');

}else{

return back()->with('error', 'Opps! Please try again');

}


My Answer:
you please provide more context or clarify your question? It seems like you are asking if something can be done in Laravel 8 using PHP, but it is not clear what specific task or functionality you are referring to. Please provide more details so I can assist you better.

Rate this post

4 of 5 based on 8397 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us