Display html content along with blade in Laravel
When you want to display an html content in the laravel blade in normal way you will type the html code and then store it in a variable as shown below and you will try to display it.
$content = '<p><label>Lorem</label> ipsum dolor <img src="images/img.jpg"></p>'
We will look at two different ways for displaying the html content.
{!! $content !!}
Another way is to use html_entity_decode as shown below:
{{ html_entity_decode($content) }}
Comments
0 comments
Please Sign in or Create an account to Post Comments