How to display HTML tags In Laravel blade

You can display HTML tags In Laravel blade using using {!! $data !!} and @php echo html_entity_decode($data) @endphp. It helps you to display the HTML tags as tags not as text.

Answers 1
  • Laravel display HTML content in blade as unescaped Data

    --PATH resources\views\<home>.blade.php
    {!! $data->body !!}
    //Or
    @php echo html_entity_decode($data->body) @endphp
    
    0

    You can use {!!  and  !!} and @php echo html_entity_decode($data->body) @endphp to display HTML content as HTML in laravel view file.   

  • Back to code snippet queries related laravel