This commit is contained in:
Kekskurse 2021-01-19 20:17:56 +01:00
parent 4bb86d4b4d
commit 9082b89b76
2 changed files with 2 additions and 2 deletions

View file

@ -155,7 +155,7 @@ class GalleryController extends BaseController
public function showImagesView($name) {
$gallery = Gallery::getByTenantAndUrl(session("current_tenant_id"), $name);
$tenant = Tenant::query()->where("id", "=", $gallery->tenant)->firstOrFail();
$images = Image::query()->where("gallery", "=", $gallery->id)->get();
$images = Image::query()->where("gallery", "=", $gallery->id)->whereNull("deleted_at")->get();
return view("gallery.images", ["images" => $images, "gallery" => $gallery, "tenant" => $tenant]);
}

View file

@ -38,7 +38,7 @@ class PublicController extends BaseController
public function listGalleryImagesView($tenant, $gallery) {
$tenant = Tenant::query()->where("url", "=", $tenant)->firstOrFail();
$gallery = Gallery::getByTenantAndUrl($tenant->id, $gallery);
$images = Image::query()->where("gallery", "=", $gallery->id)->get();
$images = Image::query()->where("gallery", "=", $gallery->id)->whereNull("deleted_at")->get();
return view("themes.gallery.gallery-detail.list", ["gallery" => $gallery, "tenant" => $tenant, "images" => $images]);
}