2014-02-19 89 views
1

我在我的母版页上工作,该页面目前无法正常工作。在浏览器中,它返回:Laravel master page not working

@layout('master')而不是指定的键。

在routes.php文件代码鉴于

Route::get('/', function() 
    {  
     return View::make('index');  
    }); 

代码:index.blade.php鉴于

@layout('master') 
    @section('container') 
    <h1> Hey </h1> 
    @endsection 

代码:master.blade.php

<div class="container"> 
@yield('container') 
+0

发现问题,从布局编辑到扩展。 – user3185936

回答

1

您需要在L4使用@extends('master')并让它就在你的文件的顶部。

我的意思是右上方第一行,周围没有空白。这个用法在L3中是一个问题,不确定它是否也适用于L4。