Home > Backend Development > PHP Tutorial > laravel 错误: View [common.header] not found. !

laravel 错误: View [common.header] not found. !

WBOY
Release: 2016-06-06 20:07:12
Original
1779 people have browsed it

这个我的views的目录结构:
访问index可以啊,但是访问了apply就出错了,不是继承了一个base吗?
laravel 错误: View [common.header] not found. !

laravel 错误: View [common.header] not found. !

都是@extends('pc.base')

然后:

<code> <!--start-home-->
    @include('pc.common.header')

    @section('main')
    @show
        
    @include('pc.common.footer')

    @include('pc.common.fixer')
</code>
Copy after login
Copy after login

访问apply就出错了:
laravel 错误: View [common.header] not found. !

回复内容:

这个我的views的目录结构:
访问index可以啊,但是访问了apply就出错了,不是继承了一个base吗?
laravel 错误: View [common.header] not found. !

laravel 错误: View [common.header] not found. !

都是@extends('pc.base')

然后:

<code> <!--start-home-->
    @include('pc.common.header')

    @section('main')
    @show
        
    @include('pc.common.footer')

    @include('pc.common.fixer')
</code>
Copy after login
Copy after login

访问apply就出错了:
laravel 错误: View [common.header] not found. !

查看路径对不对

common文件夹里面有header.blade.php吗?

楼上说的对,看看路径中有没有文件,或是文件的路径写的不对!

common中肯定不存在 header.blade.php文件 添加上即可

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template