我想顯示具有以下代碼視圖:PHPLaravel:我如何顯示搜索
{!! 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')
在這之後的路線。 PHP有:
Route::get('/', function() {
return view('index');
});
Route::get('/about/', function() {
return view('about');
});
Route::get('/about/', '[email protected]');
我收到以下錯誤:
`FileViewFinder.php中的InvalidArgumentException行137:
View [index.blade] not found。
FileViewFinder.php 137行中的ErrorException:
未找到[index.blade]。 (View:C:\ Bitnami \ wampstack-5.5.30-0 \ apache2 \ htdocs \ GameOfLife \ resources \ views \ layouts \ app.blade.php)
FileViewFinder.php中的ErrorException 137行:
View [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程序代碼的執行。
它是'@ extends'。 – lagbox