【发布时间】:2016-03-31 13:09:22
【问题描述】:
我正在尝试显示具有以下代码的视图:
{!! Stored in /resources/views/about.blade.php !!}
@extends('layouts.app')
@section('title')
Conway's Game Of Life - About
@endsection
@section('content')
<h2>Conway's Game Of Life - About</h2>
<p>The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970.</p>
@endsection
然后是以下主刀片页面:<!-- Stored in /resources/views/layouts/app.blade.php -->
<title>@yield('title')</title>
@yield('content')
在这之后会出现一个 routes.php:
Route::get('/', function () {
return view('index');
});
Route::get('/about/', function () {
return view('about');
});
Route::get('/about/', 'HomeController@About');
我收到以下错误:
`FileViewFinder.php 第 137 行中的 InvalidArgumentException:
View [index.blade] not found.
ErrorException in FileViewFinder.php line 137:
未找到视图 [index.blade]。 (查看:C:\Bitnami\wampstack-5.5.30-0\apache2\htdocs\GameOfLife\resources\views\layouts\app.blade.php)
ErrorException 在 FileViewFinder.php 第 137 行:
未找到视图 [index.blade]。 (查看:C:\Bitnami\wampstack-5.5.30-0\apache2\htdocs\GameOfLife\resources\views\layouts\app.blade.php) (查看:C:\Bitnami\wampstack-5.5.30-0\ apache2\htdocs\GameOfLife\resources\views\layouts\app.blade.php)`
我应该怎么做才能避免出错?
谢谢你帮我摆脱困境!
PS,建议:
以下答案均未找到问题的解决方案。这可能是我使用 PHP7,而不是任何较小的版本吗?它可能会影响 Laravel 程序代码的执行。
【问题讨论】: