in blade file tried these following:
{{ $words }} //No line breaks displayed
{{ nl2br($words )) }} // result as described above
{{ nl2br(e($words)) }} // result as described above```
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I want to save line breaks or other html intepretation in my CRUD application, f.e. "Line 1 < br> Line 2" should make a new line or "< b>bold text< /b>"
I also tried special chars like \n &br; They disappear when i write them to sql.
I may try WYSIWYG editor but for my use it would just interpret html.
I suppose solution is easy but I can't find it.
When it's stored in the DB with the BR-tag, you can then get the text to display properly using {!! $variable !!} instead of {{ $variable }}.
If you use {{}}, Blade will automatically turn all the HTML-tags to safe, displayable codes like & lt; and & gt;.
Using {!! !!} instead, Blade will not convert your HTML tags and the text will display as you intended.
Please or to participate in this conversation.