entity needs to be saved after image upload and associate

This commit is contained in:
jakob 2019-10-22 11:18:08 +02:00
parent d7557befe2
commit bc38fd3ac4

View file

@ -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) {