"name");// 有没有类似方法View::XX($html, $data);来获取渲染之后的数据?">
当前位置:Gxlcms > PHP教程 > 如何用Laravel的templateengine渲染字符串?

如何用Laravel的templateengine渲染字符串?

时间:2021-07-01 10:21:17 帮助过:22人阅读

$html = "{{ $var }}...";
$data = array("var" => "name");
// 有没有类似方法View::XX($html, $data);来获取渲染之后的数据?

回复内容:

$html = "{{ $var }}...";
$data = array("var" => "name");
// 有没有类似方法View::XX($html, $data);来获取渲染之后的数据?

radic/blade-extensions 这里面有一个 BladeString

你可以尝试一下。

人气教程排行