3
單獨的刀片
我的HTML代碼如何創建菜單,內容,側邊欄和頁腳
<html>
<head>
</head>
<body>
<div id="content">
<div id="menu"></div>
<div id="container"></div>
<div id="sidebar"></div>
<div id="footer"></div>
<div>
</body>
</html>
master.blade.php是
<html>
<head>
@yield('title')
@yield('css')
@yield('js')
</head>
<body>
<div id="content">
<div id="container"></div>
<div>
</body>
</html>
menu.blade.php是
<div id="menu"></div>
sidebar.blade.php是
<div id="sidebar"></div>
footer.blade.php是
<div id="footer"></div>
我的看法文件是home.blade.php
@extends('layouts.master')
@section('title')
<title>:: Login ::</title>
@stop
@section('js')
@stop
@extends('layouts.menu')
@extends('layouts.sidebar')
@extends('layouts.footer')
router.php
Route::get('home', array('uses' => '[email protected]'));
HomeController.php是
public function home()
{
return View::make('home');
}
ID我運行
localhost/project/public/index.php/home
它只顯示主基片的文件內容,Y側邊欄,頁腳和菜單不顯示,什麼是錯。
WATS '@extends' 和「之間的區別@包括' –
@extends基本上是佈局,所以如果你不使用它作爲你的第一個視圖, 不起作用。如果您需要爲某些視圖添加更多代碼,則必須使用部分或包含視具體情況而定。 –