diff --git a/src/Illuminate/Http/Request.php b/src/Illuminate/Http/Request.php index edcab364e5dc..fe1ca79e9d59 100755 --- a/src/Illuminate/Http/Request.php +++ b/src/Illuminate/Http/Request.php @@ -498,6 +498,17 @@ protected function isValidFile($file) return $file instanceof SplFileInfo && $file->getPath() != ''; } + /** + * Determine if a header is set on the request. + * + * @param string $key + * @return bool + */ + public function hasHeader($key) + { + return ! is_null($this->header($key)); + } + /** * Retrieve a header from the request. *