Im trying to create an encrypted cookie using Javascript Code that Laravel can understand.
My current laravel project includes a pure JS code. In that JS code I displayed a JQVMAP.com Map and people click to define their country. In order to create a location cookie I included the following code:
setCookie(cookieName, code, 60); // minutes
The problem is that the value is created and stored in plain text -> EG: 'US'
But, For Laravel I need to create a cookie in the same way laravel encryption produce one, where 'US' data is represented like:
eyJpdiI6IjBlYlZqUU14ZWt4Q2FKUjNJd25BM.....
Honestly, despite the fact I read stackoverflow and google I was not able to find a way to do that.
any help appreciated
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2FudIsF
via IFTTT
Aucun commentaire:
Enregistrer un commentaire