This commit is contained in:
Kekskurse 2021-01-20 00:42:58 +01:00
parent b92a83554f
commit 97e1efe20d

View file

@ -207,7 +207,12 @@ 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)->whereNull("deleted_at")->get();
$images = Image::query()
->where("gallery", "=", $gallery->id)
->orderBy("rating")
->orderBy("DateTimeOriginal")
->whereNull("deleted_at")
->get();
return view("gallery.images", ["images" => $images, "gallery" => $gallery, "tenant" => $tenant]);
}