php单页菜单,php-如何为菜单,内容,侧边栏和页脚创建单独的刀片

我的html代码是

master.blade.php是

@yield('title')

@yield('css')

@yield('js')

menu.blade.php是

sidebar.blade.php是

footer.blade.php是

我的查看文件是home.blade.php

@extends('layouts.master')

@section('title')

:: Login ::

@stop

@section('js')

@stop

@extends('layouts.menu')

@extends('layouts.sidebar')

@extends('layouts.footer')

router.php

Route::get('home', array('uses' => 'HomeController@home'));

HomeController.php是

public function home()

{

return View::make('home');

}

我跑

localhost/project/public/index.php/home

它只显示主刀片文件的内容,y边栏,页脚和菜单未显示,这是什么错误.

解决方法:

创建一个包含菜单的布局@,包括:

@yield('title')

@yield('css')

@yield('js')

@include('menu')

@yield('content')

您的菜单:

和您的看法:

@extends('layouts.master')

@section('title')

:: Login ::

@stop

@section('content')

This is your content!

@stop

标签:laravel-4,html,php

来源: https://codeday.me/bug/20191029/1963220.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值