Support the ongoing development of Laravel.io →
posted 9 years ago
Authentication
Last updated 1 year ago.
0

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.

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

mahenn mahenn Joined 5 Aug 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.