Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

In Laravel, you can use the double curly brace syntax with the nl2br function to show a line break between div elements. For example:

<div>
    {{ nl2br($text) }}
</div>

<div>
    {{ nl2br($moreText) }}
</div>

This will output the $text and $moreText variables with a line break between the two div elements. The nl2br function converts newline characters to HTML line breaks.