找不到 laravel5 的布局

Cannot find layout with laravel5

我收到这个错误:

未找到视图 [layouts.master]。 (视图: C:\xampp5\htdocs\laravel\laravel\resources\views\page.blade.php)

这是我的主人。blade.php:

<html>

<head>
    <title>@yield('title')</title>
</head>

<body>
@section('sidebar')
    This is the master sidebar.
@show

<div class = "container">
    @yield('content')
</div>

</body>
</html>

这是页面。blade.php:

@extends('layouts.master')
@section('title', 'Page Title')

@section('sidebar')
    @parent
    <p>This is appended to the master sidebar.</p>
@endsection

@section('content')
    <h2>{{$name}}</h2>
    <p>This is my body content.</p>
@endsection

这是路线的相关部分:

Route::get('blade', function () {
    return view('page',array('name' => 'Random Name'));
});

master.blade.php放在这个目录中:

C:\xampp5\htdocs\laravel\laravel\resources\views\layouts

或更改布局路径:

@extends('layouts.master')

对此:

@extends('master')

像这样

@extends('master')
@section('title', 'Page Title')

@section('sidebar')
    @parent
    <p>This is appended to the master sidebar.</p>
@endsection

@section('content')
    <h2>{{$name}}</h2>
    <p>This is my body content.</p>
@endsection