title: Where can I set headers in laravel
body: <p>I want to set headers as <code>array('Cache-Control'=&gt;'no-cache, no-store, max-age=0, must-revalidate','Pragma'=&gt;'no-cache','Expires'=&gt;'Fri, 01 Jan 1990 00:00:00 GMT');</code> for all my views, currently I'm doing this in all controllers while returning views, like </p>
  
  <pre><code>$headers=array('Cache-Control'=&gt;'no-cache, no-store, max-age=0, must-revalidate','Pragma'=&gt;'no-cache','Expires'=&gt;'Fri, 01 Jan 1990 00:00:00 GMT');
  
  Redirect::to('/',301,$headers);`
  </code></pre>
  
  <p>So instead of writing this for each and every route can it be done in global scope, so that headers are set for every view.</p>
  
  <p>I tried setting headers by creating after filter, but didn't get it to work.</p>
  
  <p>Can anyone tell me where can I set the headers for all my views? </p>
  
  <p><strong>UPDATE</strong>
  One of my view file meta content</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
  &lt;meta charset="UTF-8"&gt;
  &lt;title&gt;
  </code></pre>
  
  <p>Now when i use <code>Redirect::to('/',301,$headers)</code>
  The header in firebug is</p>
  
  <pre><code>Cache-Control   max-age=0, must-revalidate, no-cache, no-store, private
  Connection  Keep-Alive
  Content-Type    text/html; charset=UTF-8
  Date    Tue, 09 Jul 2013 14:52:08 GMT
  Expires Fri, 01 Jan 1990 00:00:00 GMT
  </code></pre>
  
  <p>And when I use <code>Redirect::to('/');</code></p>
  
  <p>The header in firebug is</p>
  
  <pre><code>Cache-Control   no-cache
  Connection  Keep-Alive
  Content-Type    text/html; charset=UTF-8
  Date    Tue, 09 Jul 2013 14:52:08 GMT
  </code></pre>