Quick look at the source code suggests not, although Sessions and Cookies are probably the two most difficult things to follow through the application in laravel.
This actually makes sense, because if you were able to access Cookie's via that getter, it would completely destroy any of the security the encryption provides, as i could simply replace an encrypted cookie with a plain text one, and laravel would treat it just the same.
What your asking for would require the application to have an array of protected cookie keys in its config, to enforce encryption or require the developer to check if the cookie was plaintext or encrypted before trusting it. Which is not really what laravel is about. Laravel will give you as much config as it can, but it will generally always favour simplicity and convention over configuration.
With all that said, theres nothing wrong with using
$_COOKIE, we don't need classes with getters and setters for every basic thing in PHP.
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us
The Laravel portal for problem solving, knowledge sharing and community building.