From 5f5282e9b6c6fa8209b5f75abe838a09547becbd Mon Sep 17 00:00:00 2001 From: Kekskurse Date: Sun, 17 Jan 2021 03:07:52 +0100 Subject: [PATCH] Test --- app/Http/Controllers/PublicController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/PublicController.php b/app/Http/Controllers/PublicController.php index fb8e0c5..103e515 100644 --- a/app/Http/Controllers/PublicController.php +++ b/app/Http/Controllers/PublicController.php @@ -42,16 +42,16 @@ class PublicController extends BaseController return view("themes.gallery.gallery.list", ["gallery" => $gallery, "tenant" => $tenant, "images" => $images]); } - public function returnImageFile($tenant, $gallery, $image, Request $request) { + public function returnImageFile($tenant_url, $gallery_url, $image_id, Request $request) { $sizeName = $request->input("size", "medium"); if(!array_key_exists($sizeName, $this->size)) { abort(400, "Size not exists"); } $size = $this->size[$sizeName]; - $image = Image::query()->where("id", "=", $image)->firstOrFail(); - $gallery = Gallery::query()->where("id", "=", $gallery)->firstOrFail(); - $tenant = Tenant::query()->where("id", "=", $tenant)->firstOrFail(); + $image = Image::query()->where("id", "=", $image_id)->firstOrFail(); + $gallery = Gallery::query()->where("url", "=", $gallery_url)->firstOrFail(); + $tenant = Tenant::query()->where("url", "=", $tenant_url)->firstOrFail(); if($gallery != $gallery->url) { abort(404, "Gallery not match"); }