我正在逐步制作Laravel教程,但是@extends让我发现错误,即找不到View [layouts.master]。我的layouts文件夹位于resources / views / layouts中,而我的master.blade.php位于layouts文件夹中。我的connexion.blade.php在resources / views / connexion.blade.php中,所以使用@extends('layouts.master')我不应该有任何错误。我很好地完成了laravel教程,但似乎很奇怪。
资源/视图/ CONNEXION.BLADE.PHP
@extends('layouts.master')
@section('titre', 'Connexion')
@section('body')
@stop
资源/视图/设计/ 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>
问题不是没有找到但是文件许可为什么laravel dev没有让PERMISSION DENIED而不是NOT FOUND
举起...... My layouts folder is in resources/views/layouts and my master.blade.php in the layouts folder.
这意味着你的master.blade.php
在resources/views/layouts/layouts
内?这意味着扩展功能将是@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']);