使用php echo 可以很好地工作
<!-- app/views/example.blade.php -->
<p><?php echo $taylorTheVampireSlayer; ?></p>
下面的代码去掉了双括号。
刀片模板系统似乎无法在我的localhost/lampstack上运行。
我已经检查了所有权限,并尝试了的原始代码
<!-- app/views/example.blade.php -->
<p>{{ $taylorTheVampireSlayer }}</p>
尝试使用这些!
Blade::setContentTags('{{', '}}'); // for variables and all things Blade
Blade::setEscapedContentTags('{{{', '}}}'); // for escaped data
希望这能有所帮助!快乐larveling:)
我也遇到了同样的问题,正如Eluong所说,通过在"name"answers".php"之间添加"blade"来更改视图的名称,已经解决了这个问题。
name.php:问题name.blade.php:已解决