【发布时间】:2017-12-04 03:20:18
【问题描述】:
我在 Laravel 上有两个页面。
我可以轻松地在另一个刀片部分中扩展此布局,以获得带有页眉、内容和页脚的工作模式,我可以使用 @extends('master') 嵌入它们。
我的问题是:
第一页使用header1.blade.php。
第二页使用header2.blade.php。
master.blade.php 是我的母版页。
<body>
@include('partials.header1')
@yield('content')
@include('partials.footer')
</body>
在index.blade.php 上使用master.blade.php 是带有extends('master.blade.php 的母版页)。
在listnews.blade.php 上具有相同的母版页。
我想在listnews.blade.php 使用partials.header2。
有什么办法吗?
【问题讨论】: