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