Support the ongoing development of Laravel.io →
Database Views Laravel.io

When i try to print using blade syntax {{ $var }}

"this

is test"

from database column type text i get result

"this is test".

There are no line breaks. I tried with {!! $var !!} but still one line. Any ideas?

Last updated 3 years ago.
0

Perhaps backup a little and learn some basic php and html.

<br>
0

Did you try {!! nl2br($var) !!} or {!! nl2br(e($var)) !!}.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

filip01 filip01 Joined 2 Jan 2015

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.

© 2025 Laravel.io - All rights reserved.