我在我的控制器中以以下方式使用布局,如文档中所述(请注意,没有返回任何内容):
public function someControllerFunction () {
$this->layout = View::make('layout');
$this->layout->content = View::make('page', $params);
}
cache-control
标题如下:
<?php
header('Cache-Control: public');
header('Cache-Control: max-age=600');
Log::info("headers set in layout");
?>
<?php
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
Log::info("headers set in View");
?>
我试着把它放在我的视线里,但没有雪茄。查看视图中的php正在执行的日志
在布局中,导致布局定义的标题覆盖视图定义的标题。
return Response::view('page')->header('Cache-Control', '...');
但是我如何使用布局做出响应呢?我在文件中找不到任何提及此事的地方。