laravel - Intervention Image source not readable on update -
i have searched, , did not find answer problem.
well, using intervention laravel 5.5 upload photos. when create
new recipe(in case), working , photos being uploaded succefully.
this code initial upload:
$front_image = $request->file('front_image'); $frontimagename = md5(time()) . '.' . $front_image ->getclientoriginalextension(); $locationfi = public_path('photos/front/' . $frontimagename); image::make($front_image) ->resize(454,340) ->insert(public_path('photos/logo.png'),'bottom-right') ->save($locationfi); $recipe->front = $frontimagename;
all standard stuff. when try edit
recipe, image source not readable
. code re upload:
$front_image = $request->file('front_image'); $frontimagename = md5(time()).'.'.$front_image ->getclientoriginalextension(); $location = public_path('photos/front/'.$frontimagename ); image::make($front_image)->resize(690,517) ->insert(public_path('photos/tk.png'),'bottom-right') ->save($location); //update database $recipe->front=$imagename;
i use enctype="multipart/form-data"
in both forms, create , update. on update form use {{method_field('put'}}
.
what missing here? thanks.
i have solved problem. "it little things", say. when inserted logo image, refered phtoto not exists. thats why gave me error, obviously.
Comments
Post a Comment