Infolist - TextEntry - listWithLineBreaks
Hello together!
I am new in this channel and kind of afraid that I do something wrong with my post. So upfront please excuse for it.
Issue:
I am storing in my table data with line breaks e.g.
I am using in my Resource the public static function infolist and try together with
TextEntry::make
and ->listWithLineBreaks()
to display the line breaks in the view. However, it seems that the line breaks are ignored and all is in one line.
E.g.
Does anyone has a hint what I am doing wrong?
Greetings and happy coding!
N16htSh1ftSolution:Jump to solution
I think listWithLineBreaks() is expecting the data to be in an array. Feel like you’re just thinking about it wrong. You might need to format the state to use something like php’s nl2br or convert the state to an array using the breaks as a delimiter.
1 Reply
Solution
I think listWithLineBreaks() is expecting the data to be in an array. Feel like you’re just thinking about it wrong. You might need to format the state to use something like php’s nl2br or convert the state to an array using the breaks as a delimiter.