diff --git a/app/Http/Controllers/PublicController.php b/app/Http/Controllers/PublicController.php index 6a46eaf..4f78e1b 100644 --- a/app/Http/Controllers/PublicController.php +++ b/app/Http/Controllers/PublicController.php @@ -35,6 +35,10 @@ class PublicController extends BaseController $tenant = Tenant::query()->where("url", "=", $tenant)->firstOrFail(); $gallery = Gallery::getByTenantAndUrl($tenant->id, $gallery); $images = Image::query()->where("gallery", "=", $gallery->id)->get(); + $domains = explode(",", env("DOMAINS", "localhost")); + foreach($images as $image) { + $image->domain = $domains[array_rand($domains)]; + } return view("themes.gallery.default.list", ["gallery" => $gallery, "tenant" => $tenant, "images" => $images]); } diff --git a/resources/views/themes/gallery/default/list.blade.php b/resources/views/themes/gallery/default/list.blade.php index 6c83f45..0ba101e 100644 --- a/resources/views/themes/gallery/default/list.blade.php +++ b/resources/views/themes/gallery/default/list.blade.php @@ -7,8 +7,8 @@