I want to display data in the HTML page. The data is like some code of line. There are some HTML tags like a, p, b etc. I want to display all as a text but only 1 as a tag.
I all ready try {!! $data->text !!} but it's convert all the text in a html tags.
public function scopeText()
{
$text='<a href="#" id="tl">Tag link</a> <p>paragraph</p>
<a href="#">Text link</a>';
return $text;
}
<div>
{{ $data->text() }}
</div>
<a href="#" id="tl">Tag link</a> <p>paragraph</p> <a href="#">Text
link</a>
Tag link paragraph Text link
Tag link paragraph Text link
<a href="#" id="tl">Tag link</a> <p>paragraph</p> <a href="#">Text
link</a>
Tag link <p>paragraph</p> <a href="#">Text link</a>
only 1 'a' tag want to work as a tag and other things should print as a text.