我想爲我的項目創建模板。在我的項目中,我爲所有頁面使用了標題和CSS以及js和footer(即page1.blade.php,page2.blade.php等等)。在加載每個頁面時,需要更多時間來加載。因此,我需要創建一個通用佈局並在內容部分加載內容(即page1.blade.php,page2.blade.php等)。在laravel中創建模板5.3
如何創建主佈局並加載page1.blade.php和page2.blade.php等。筆者希望創建鏈接此
<html>
<head>
<title>Title</title>
</head>
<body>
@section('sidebar')
This is the master sidebar.
@show
<div class="container">
@yield('content')
</div>
</body>
如何創建路線只是延長? – user3386779
您可以在Route.php文件中鍵入Route :: method('url','Controller @ action')。 但我建議去https://laracasts.com並通過幾個初學者系列。 – Henrik