Hi All!
Lets say that i need to have all the users entered data encrypted in my db and i am doing it like this:
Crypt::encrypt($request['content'])
Does this mean that i have to be absolutely sure that i don't loose my app_key which is in my .env file?
Yes, to decrypt you need the same APP_KEY
you used to encrypt.
You can just test it in artisan tinker
console. Start console, encrypt something, save in a file, exit, change app key in .env
file, restart console, load a file, try to decrypt.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community