entity needs to be saved after image upload and associate
This commit is contained in:
parent
d7557befe2
commit
bc38fd3ac4
1 changed files with 1 additions and 0 deletions
|
@ -82,6 +82,7 @@ class BaseRepo
|
||||||
$this->imageRepo->destroyImage($entity->cover);
|
$this->imageRepo->destroyImage($entity->cover);
|
||||||
$image = $this->imageRepo->saveNew($coverImage, 'cover_book', $entity->id, 512, 512, true);
|
$image = $this->imageRepo->saveNew($coverImage, 'cover_book', $entity->id, 512, 512, true);
|
||||||
$entity->cover()->associate($image);
|
$entity->cover()->associate($image);
|
||||||
|
$entity->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($removeImage) {
|
if ($removeImage) {
|
||||||
|
|
Loading…
Reference in a new issue