dimanche 26 février 2017

Laravel: Layouts.master not found

I built the demosite in Laravel, but I got the following error:

ErrorException in FileViewFinder.php line 137: View [layouts.master] not found.(View: /var/www/html/project/laravel/laravel/resources/views/page.blade.php)

The master.blade.php is next to the page.blade.php, both are in resources/views

master.blade.php

<html>
    <head>
        <title>@yield('title')</title>
    </head>
    <body>
        @section('sidebar')
        This is the master sidebar.
        @show
        <div class="container">
        @section('content')
        </div>
    </body>
</html>

page.blade.php

@extends('layouts.master')
@yield('title', 'Page Title')
@section('sidebar')
@parent
<p>This is appended to the master sidebar.</p>
@endsection
@section('content')
<h2></h2>
<p>This is my body content.</p>
@endsection

What goes wrong? I working from this tutorial.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire