Reputation: 20565
So i have the following value:
$content = "<ol><li>AbC</li></ol><p>sd</p>"
Now I wish to display this on my page.blade.php
But I am not quite sure how to do it. I have attempted with:
{{$content}}
But as expected it just prints the HTML and does not actually inject it.
So my question is how do I inject the HTML?
Upvotes: 2
Views: 743
Reputation: 9863
Try the following-
{!!$content!!}
{{ }}
will result in auto escape of string.
Upvotes: 3
Reputation: 101
Make sure you are passing variable to your view. Then you can access this by 2 ways:
{{!! $content !!}}
or
<?php echo $content; ?>
Upvotes: 0