From e08714d65a2f3ab503fd59061aa8ab2fc37e19a4 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 14 Feb 2017 12:24:01 -0600 Subject: [PATCH] check for files --- src/Illuminate/Foundation/helpers.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Illuminate/Foundation/helpers.php b/src/Illuminate/Foundation/helpers.php index fca9b4d31f02..494c006d3229 100644 --- a/src/Illuminate/Foundation/helpers.php +++ b/src/Illuminate/Foundation/helpers.php @@ -671,6 +671,10 @@ 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); } }