好的,所以我刚刚学习Laravel并且遇到了问题...
我在_master文件夹中有一个名为regular_template.blade.php的模板页面我在视图中有标准的home.blade.php,在控制器中有HomeController.php
在home.blade.php文件中我有这个
@extends("_master.regular_template")
@section("content")
<div id="top-bar"></div>
@stop
但出于某种原因,当它在视图文件中时,它不会在屏幕上显示,但它显示在母版页中,这是我的路线
Route::get("", "HomeController@getIndex");
Route::controller("home", "HomeController");
在家庭控制器页面中我有这个...
class HomeController extends BaseController {
protected $layout = "_master.regular_template";
protected $restful = true;
public function getIndex() {
$this->layout->title = "Homepage";
$this->layout->content = View::make("home");
}
public function missingMethod($parameters) {
return "404";
}
}
有人知道这是为什么吗?提前谢谢!