title: Laravel Cookie Not Showing Up Via Javascript
body: <p>I'm newbie learning laravel and have the following in my route file::</p>
  
  <pre><code>Route::get("/setcookie", function(){
      $cookie = Cookie::make("low-carb","almond cookie",30);
      return Redirect::to("getcookie")-&gt;withCookie($cookie);
  });
  
  Route::get("/getcookie", function(){
      $cookie = Cookie::get("low-carb");
      return View::make("getcookie")-&gt;withCookie($cookie);
  });
  </code></pre>
  
  <p>I set a cookie and redirect to a different page. I want to be able to show the cookie via javascript dialog box in a view page. The "getcookie" view page looks like::</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  this is the cookie page
  &lt;script language="javascript"&gt;
      window.onload = showCookies;
  
      function showCookies(){
  
          alert("Cookie is: " + document.cookie);
         }
  
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The only thing i see on the popup dialog box is "Cookie is". The value am expecting doesn't show up.</p>
  
  <p>I know definitely that am doing something wrong because when i check the cookies in the chrome developer tools, i see for the "setcookie" route, the keys REQUEST COOKIE and RESPONSE_COOKIE (laravel_session and low-carb) both have values but for the "getcookie" route where it is redirected to, the REQUEST COOKIE key in chrome has both "laravel_session and low-carb" but the RESPONSE_COOKIE key only has the "laravel_session" and the "low-carb" key-value is missing.</p>
  
  <p>What am i doing wrong?</p>