From 612f92c4ef7b36a3ac7a802a273ba1b58c0537a9 Mon Sep 17 00:00:00 2001 From: Toon Van den Bos Date: Sat, 27 Apr 2024 17:20:27 +0200 Subject: [PATCH] Fixed translated slug query since SQL injection fix --- src/HasSlug.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HasSlug.php b/src/HasSlug.php index bda0ce9..4bb80b1 100644 --- a/src/HasSlug.php +++ b/src/HasSlug.php @@ -256,7 +256,7 @@ public function resolveRouteBinding($value, $field = null) // Get the models where this slug exists in other langs as well $results = $this->getRouteBindingQueryBuilder() - ->whereRaw('JSON_SEARCH(`?`, "one", "?")', [$key, $value]) + ->whereRaw('JSON_SEARCH(`'.$key.'`, "one", "?")', [$value]) ->get(); // If we have zero or multiple results, don't guess