Laravel 5: Display HTML with Blade

后端 未结 20 2467
栀梦
栀梦 2020-11-22 16:21

I have a string returned to one of my views, like this:

$text = \'

Lorem ipsum dolor

20条回答
  •  无人共我
    2020-11-22 16:37

    Please use

    {!! $test !!} 
    

    Only in case of HTML while if you want to render data, sting etc. use

    {{ $test }}
    

    This is because when your blade file is compiled

    {{ $test }} is converted to while

    {!! $test !!} is converted to

提交回复
热议问题