From 18d16486103292c681c29f503b27bf3affb5a2d3 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 14 Feb 2017 12:26:58 -0600 Subject: [PATCH] simplify implementation --- src/Illuminate/Foundation/helpers.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Illuminate/Foundation/helpers.php b/src/Illuminate/Foundation/helpers.php index 494c006d3229..57b50e1c546e 100644 --- a/src/Illuminate/Foundation/helpers.php +++ b/src/Illuminate/Foundation/helpers.php @@ -671,11 +671,7 @@ function request($key = null, $default = null) return app('request')->only($key); } - if (app('request')->hasFile($key)) { - return app('request')->file($key); - } - - return app('request')->input($key, $default); + return data_get(app('request')->all(), $key, $default); } }