diff --git a/app/Http/Controllers/GalleryController.php b/app/Http/Controllers/GalleryController.php index cb86b8f..3463944 100644 --- a/app/Http/Controllers/GalleryController.php +++ b/app/Http/Controllers/GalleryController.php @@ -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]); } diff --git a/app/Http/Controllers/PublicController.php b/app/Http/Controllers/PublicController.php index 6e3a7af..8e5d108 100644 --- a/app/Http/Controllers/PublicController.php +++ b/app/Http/Controllers/PublicController.php @@ -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]); }