【发布时间】:2018-02-17 00:24:21
【问题描述】:
我在使用 Laravel Framework 5.4.36(在 Visual Studio 代码上)时遇到问题。我正在尝试构建一个简单的布局,但无论我尝试了多少次,我的浏览器都会出现同样的错误:
未找到查看 [layouts.app]。 (查看:C:\wamp64\www\lsapp\resources\views\pages\services.blade.php)
这是我的布局 app.blade.php 的代码:
<!DOCTYPE html>
<html lang="{{ app()->getLocale() }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{config('app.name','LSAPP')}}</title>
</head>
<body>
@yield('content')
</body>
这是我来自 services.blade.php 的代码
@extends('layouts.app')
@section('content')
<h1>services</h1>
<p>This is the services page</p>
@endsection
我还安装了 Laravel Blade Snippets v 1.13.0(1.14.1 给了我另一个问题)。
我尝试更改布局文件和扩展参数内部的名称和路径。任何想法为什么这不起作用?
非常感谢您的帮助..!
【问题讨论】: