如何通过Laravel模板引擎渲染字符串

iyo*_*lus 7 php laravel blade

如何呈现包含刀片语法的字符串?

View::render('{{$var}}')->with('var', $var); // Like this for Example
Run Code Online (Sandbox Code Playgroud)

sha*_*ddy 1

我相信这就是您正在寻找的

https://github.com/TerrePorter/StringBladeCompiler

该软件包允许您编译刀片字符串。