title: Get Header Authorization key in laravel controller?
body: <p>Trying to get the <strong>header authorization key</strong> in controller for making an <strong>API</strong>. Request is making from <strong>fiddler</strong>.</p>
  
  <pre><code>$headers = apache_request_headers();
  </code></pre>
  
  <p>And the <strong>$header</strong> contains an array.</p>
  
  <pre><code>Array
  (
      [User-Agent] =&gt; Fiddler
      [Host] =&gt; localhost:8000
      [Content-Length] =&gt; 102
      [Authorization] =&gt; TestKey
  )
  </code></pre>
  
  <p>If am trying like this to fetch the <strong>Authorization</strong> , its throwing error.</p>
  
  <pre><code>$header['Authorization]
  </code></pre>
  
  <p><strong>Error</strong> :</p>
  
  <pre><code>Undefined index: Authorization
  </code></pre>
  
  <p>Tried many ways to get the authorization, but not working anything. Is there any way to fetch this?</p>