From f51b7bd747ff710736447faf53b1b192f56d0f85 Mon Sep 17 00:00:00 2001 From: Basanta Tajpuriya <38497591+basantashubhu@users.noreply.github.com> Date: Thu, 13 Mar 2025 11:14:36 +0545 Subject: [PATCH] Refactor get method to use data_get for query payload retrieval Refactored the get method to replace the parent class method call with data_get, which retrieves the query payload item from the request using the input source. This improves flexibility in handling the request data. --- src/Illuminate/Http/Request.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Illuminate/Http/Request.php b/src/Illuminate/Http/Request.php index 4614911560bf..db3746366899 100644 --- a/src/Illuminate/Http/Request.php +++ b/src/Illuminate/Http/Request.php @@ -398,18 +398,16 @@ public function replace(array $input) } /** - * This method belongs to Symfony HttpFoundation and is not usually needed when using Laravel. + * Retrieve a query payload item from the request. * - * Instead, you may use the "input" method. - * - * @param string $key + * @param string|null $key * @param mixed $default * @return mixed */ #[\Override] public function get(string $key, mixed $default = null): mixed { - return parent::get($key, $default); + return data_get($this->getInputSource()->all(), $key, $default); } /**