Support the ongoing development of Laravel.io →
Input Database Forms
Last updated 2 years ago.
0

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?

Last updated 2 years ago.
0

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.

Last updated 2 years ago.
0

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 :)

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

IanSirkit iansirkit Joined 24 Feb 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.