Laravel 5: Display HTML with Blade

后端 未结 20 2170
栀梦
栀梦 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:59

    I have been there and it was my fault. And very stupid one.

    if you forget .blade extension in the file name, that file doesn't understand blade but runs php code. You should use

    /resources/views/filename.blade.php
    

    instead of

    /resources/views/filename.php
    

    hope this helps some one

提交回复
热议问题