I used \n and then just simply spat out the value and it worked for me:
<textarea cols="100" rows="100">
{{ $reservation->notes }}
</textarea>
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi
I have a form with a text area. When a user adds notes they can add new lines as expected whilst they edit.
I want to be able to add new lines to this text in my code but whilst I can add the new text I can't create new lines.
The code to add new text is:
$notes .= date('d/m/Y h:i') . ": Booking created by " . $this->user->present()->fullName() . "<br/ >";
I have also tried \n instead of <br /> but it makes no difference
When I try and display it back in a form text area all I see is the charactersL (<br /> or \n) and no new lines
I have tried:
<textarea>{!! $reservation->notes !!}<textarea/>
<textarea>{!! e($reservation->notes) !!}<textarea/>
<textarea>{!! nl2br(e($reservation->notes)) !!}<textarea/>
and same combinations for {{ }}
How can I add text to existing text on a new line so it appears correctly as a new line in the textarea?
I used \n and then just simply spat out the value and it worked for me:
<textarea cols="100" rows="100">
{{ $reservation->notes }}
</textarea>
Please or to participate in this conversation.