public function header($key, $default = null) { $value = $this->getParam($key); // If the key is set in the payload then return it. if (isset($value)) { return $value; } else { return \Request::header($key, $default); } }