I'm making the Laravel tutorial step by step but the @extends is making me error that is View [layouts.master] not found. My layouts folder is in resources/views/layouts and my master.blade.php in the layouts folder. My connexion.blade.php is in resources/views/connexion.blade.php, so with the @extends('layouts.master') I'm not supposed to got any error. I'm maked the laravel tutorial perfectly but it seems to be strange.
RESOURCES/VIEWS/CONNEXION.BLADE.PHP
@extends('layouts.master')
@section('titre', 'Connexion')
@section('body')
@stop
RESOURCES/VIEWS/LAYOUTS/MASTER.BLADE.PHP
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Site Panel - @yield('titre')</title>
</head>
<body>
@yield('body')
</body>
</html>
The problem was not NOT FOUND but FILE PERMISSION why laravel dev didn't make PERMISSION DENIED instead of NOT FOUND
Hold up.... My layouts folder is in resources/views/layouts and my master.blade.php in the layouts folder.
So that means your master.blade.php
is inside resources/views/layouts/layouts
? That would mean the extend function would be @extend('layouts.layouts.master')
Blade Templates
Layout
// Extend your theme layout
@extends('layouts.master')
// Start section
@section('title')
// End Section
@endsection
@parent
// Show section in your theme
@yield('name')
// Include view in your file
@include('view.name')
// Include view with pass data
@include('view.name', ['key' => 'value']);