From fe5d94e8ba7417bf7fbea6906d336c20ede17f60 Mon Sep 17 00:00:00 2001 From: Yiwei Ho <75478661+1weiho@users.noreply.github.com> Date: Fri, 20 Dec 2024 02:07:49 +0800 Subject: [PATCH] [11.x] Update Uri `withoutQuery` method to accept string or array input (#53973) * Update Uri `withoutQuery` function to accept string or array input * Update Uri.php --------- Co-authored-by: Taylor Otwell --- src/Illuminate/Support/Uri.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Support/Uri.php b/src/Illuminate/Support/Uri.php index 3dee09822ef4..c25814d54220 100644 --- a/src/Illuminate/Support/Uri.php +++ b/src/Illuminate/Support/Uri.php @@ -274,7 +274,7 @@ public function pushOntoQuery(string $key, mixed $value): static /** * Remove the given query parameters from the URI. */ - public function withoutQuery(array $keys): static + public function withoutQuery(array|string $keys): static { return $this->replaceQuery(Arr::except($this->query()->all(), $keys)); }