I am unable to reproduce this. I tried it with the exact same string in artisan tinker, and it decrypted the string as is. Even tried left quotes and other special characters, all seem to work.
Are you sure that the data doesn't get lost before it gets passed to the encrypt function?
How are you viewing the contents of the string? If you are viewing the string in an HTML <input ... /> tag, your input may be truncating the value="..." attribute.
When using Blade, make sure you use the triple-brace notation to escape HTML special characters.
Or better yet, preview the string with JSON.
Thanks you guys... Carbon hit it, when viewing it back in an HTML <input > the double quote terminates the quoting of the value="" and the rest is lost.
Thanks again for taking the time
EDIT** Meant to mark Carbon's answer as the solution. I can't undo it it..... Whoops :)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community