【发布时间】:2014-02-12 11:53:09
【问题描述】:
我真的很困惑。这大约是我试图弄清楚刀片系统的关系的几个小时。
但是我还没有学会它的所有要点。
我的问题是:
我定义了master.blade.php,其中包含以下代码:
<!doctype HTML>
<html>
<head>
@section("header")
@show
</head>
<body>
@yield("content")
</body>
<footer>
@section("footer")
</footer>
</html>
但我不知道我应该如何在以下控制器中定义标题和内容:
class sample extends BaseController
{
protected $layout = "layout.master";
function show()
{
// the code which goes here
}
}
【问题讨论】:
标签: php templates laravel blade