Setting the httponly property to false in a cookie
laravel, php
Solution
Laravel provides an option for this, but the docs don't show it. The best way is to look through the source. If you take a look at the CookieJar.php file here you'll see the httpOnly option.
public function make($name, $value, $minutes = 0, $path = null, $domain = null, $secure = false, $httpOnly = true)
so simply do something like:
Cookie::make('MyCookie', 'MyValue', 60, null, null, false, false);
Problem
How would i using Laravel make a cookie using `Cookie::Make` (Or something else) and set the httponly property to false? I would want to do this as the cookie contains a key which my JS must be able to read.