我有一個主刀片檔案,其中包括一些其他刀片檔案,并產生一個刀片檔案的內容,我在這個刀片home上擴展了這個檔案,我可以在 phpstorm 中從我的刀片上單擊它,它會將我帶到正確的檔案,所以它們必須連接正確。mastermasterhome
問題是內容沒有加載,它只是加載頭/頁眉和頁腳,但沒有從我的 home.blade 加載。
我的 master.blade.php:
<!doctype html>
<html lang="en">
@include('partials.head')
<body>
@include('partials.header')
@yield('content')
@include('partials.footer')
</body>
</html>
在我的 home.blade.php
@extends('master')
@section('title', 'Home')
@section('content')
<main id="content">
test
</main>
@endsection
它會正確加載除該content部分之外的所有內容。我究竟做錯了什么?
我得到的唯一路線:
Route::get('/', function () {
return view('master');
});
uj5u.com熱心網友回復:
你必須改變路線的看法,
Route::get('/', function () {
return view('home');
});
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/492740.html
上一篇:如何將下拉串列選擇的值從php表單傳遞到mysql查詢
下一篇:如何根據id對嵌套陣列進行分組?
