title: How to set Cookie in Laravel in view file
body: <p>I want to create a cookie in the View File(example.blade.php). I want to create cookie in the masterfile.blade.php which is in layouts directory so I dont have a controller. In another controller and another view I am able to set cookie but I want cookie to be set when the application starts. How can I do this. I have done it in controller but I dont know how can i use directly in view, someone help.</p>
  
  <pre><code>$cookie_value= rand(1000,10000).$timestamp;
          $view = View::make('shop.show',compact('productTabs','product','storename','business'));
          $cookie = Cookie::make('gdoox_shopping_cart', $cookie_value, 1000);
          return Response::make($view)-&gt;withCookie($cookie);
  </code></pre>