Merge pull request #568 from openclassify/dia2

#1499 cover photo bug when delete cover photo
This commit is contained in:
Ozcan Durak 2020-05-18 17:24:00 +03:00 committed by GitHub
commit 0cdabdc940
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -330,10 +330,14 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
'extension' => $image->extension,
]);
$file_url = 'files/images/' . $fileName;
$adv->update(['cover_photo' => $file_url]);
$coverPhoto = 'files/images/' . $fileName;
} else {
$coverPhoto = $thumbnail->url();
}
} else {
$coverPhoto = null;
}
$adv->update(['cover_photo' => $coverPhoto]);
}
public function delete_empty_advs()