How to insert a line feed code into a character in textarea?
I'm using laravel5.4, with Formfacade.
this is my code.
Model:
User.php
public function getTagAttribute()
{
$tags = $this->tags->pluck('tag_name')->toArray();
return implode('\r\n', $tags);
}
public function tags()
{
$this->belongsToMany('App\Tag');
}
Blade:
{!!Form::textarea('tag', null, [
'class' => 'form-control keyword',
])!!}
Output
"\r\n" characters are displayed in the textarea.
I tried changing '\r\n' to '\n', '< br/>', but not worked.
anyone help me??