【问题标题】:Laravel @layout issueLaravel @layout 问题
【发布时间】:2018-01-26 11:06:03
【问题描述】:

我正在尝试使用每个页面都可以访问的页眉和页脚布局设置一个简单的模板

有点像:

<html>
<body>
@layout('header')
<stuff here>
</body>
@layout('footer')
</html>

我将它们命名为 header.blade.php 和 footer.blade.php,它们位于 index.blade.php 文件中。

但是当我运行它时,它只会打印出@layout('header') & @layout('footer')

【问题讨论】:

    标签: php layout laravel


    【解决方案1】:

    我回答了我自己的问题,您必须提供@yield('yieldname')

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-08-06
      • 1970-01-01
      • 2020-11-17
      • 1970-01-01
      • 2019-11-14
      • 1970-01-01
      • 2016-02-23
      • 2018-04-10
      相关资源
      最近更新 更多