Snippets

How to display break in Laravel blade properly?

If you use textarea and want to display break, the paragraph on the blade side here is the easiest way to do that, I guess.

You just use the following style-

{!! nl2br(e("Your text")) !!}

A complete flow will be like this-

{!! nl2br(e($post->content)) !!}

Thank y0u.