Search code examples
phplaravelecholaravel-blade

How I will add html tag double curly braces in blade file laravel


$slider->details value is slider heading in database, however, is not being rendered.

I have solved it by php echo (<?php echo $slider->details; ?>) but I want to use 

the blade syntax instead.


Solution

  • By default, Blade {{ }} statements are automatically sent through PHP's htmlspecialchars function to prevent XSS attacks.

    If you don't want the data to be escaped then you need to use {!! !!} instead of {{ }}:

    {!! $slider->details !!}
    

    Documentation for displaying data.