Laravel刀片布局

use*_*012 2 php frameworks laravel

这是问题,它不是在阅读@layout()

它没有阅读

在文件夹View/authors/index.blade.php中

@layout( 'layouts.default')

@section( '内容')

作者主页

@endsection

在文件夹Controllers/authors.php中

class Authors_Controller扩展Base_Controller {

  public $restful = true;

  public function get_index(){
      return View::make('authors.index')->with('title', 'Autores e Livros');
  }
Run Code Online (Sandbox Code Playgroud)

}

并在文件夹View/layouts/default.blade.php中

基本的HTML

<html>
<head> <title> {{ $title }} </title> </head>
<body>
{{ $content }}
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

哪里是我的错误?为什么不读书?

夹

Mr.*_*ive 5

第一:内部视图/ layouts/default.blade.php

<html>
<head> <title> {{ $title }} </title> </head>
<body>
  @yield('content')
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

第二:更新

我99%肯定你的View/authors/index.blade.php中的@layout('layouts.default')'不在第一行.它必须位于页面顶部.