How to properly use the listWithLineBreaks method from TextColumn
Heya guys, i've been playing around with the
TextColumn listWithLineBreaks function paired with some JSON data. I store this data in the database:
which is being casted to an array from the model
Now I would like to have all the data from data to be displayed in a table using the listWithLineBreaks function. I assumed that this would need an array to work with. So, my assumption would be that:
Would properly display the items in a list format. but It does not.
So, i've tried supplying the 'listWithLineBreaks' not with an array, but with a string by implode:
But that also results in a single string being displayed and not being separated on the ';'.
A workaround is to use the html() function and add <br/> to the output string but i'd rather use the function above. What am I missing out here?1 Reply
I think you need to use
state() instead of formatStateUsing
What would be the result that you need? key: value?
or this?