laravel-imageup
laravel-imageup copied to clipboard
Image not replacing
I don't know if it is bug or not. I have been trying to update an image but the old image is not deleted/replaced.
My old code which doesn't delete old image
if(isset($request->photo)) {
$model->relation->uploadImage($request->photo);
}
I change it to below and it does replace old image with the new one
// Assign it to variable
$myPhoto = $request->photo;
if(isset($myPhoto)) {
$model->relation->uploadImage($myPhoto);
}
I'm on Laravel 5.8 Imageup v1.0.6
Hi, If you are looking for something like Laravel Imager Happy to help.