zoukankan      html  css  js  c++  java
  • laravel 区块继承

    看到我的文章感觉有用的话,在评论区下面扣1,能够让我感受到你们的存在,也给我动力继续写的更好,谢谢

    定义:

    在layouts\admin.blade.php

    @yield('要定义的区块名')
    
    @yield('title')
    
    @yield('content')
    

      

    继承:

    @extends ( ' 文件夹 . 文件名 ' )

    @extends('layouts.admin')
    
    @section('title','我是新标题')
    
    @section('content')  
    
    这里所写将更新到新内容里
    
    @endsection
    

      

    TP框架

    继承

     extend name="路径/名字"

     block name="区块名"

    <html>
        <head>
            <title>应用程序名称 - @yield('title')</title>
        </head>
        <body>
            @section('sidebar')
                这是主布局的侧边栏。
            @show
    
            <div class="container">
                @yield('content')
            </div>
        </body>
    </html>
    

      

    @extends('layouts.app')
     
    @section('title', 'Page Title')
     
    @section('sidebar')
             <p>这将追加到主布局的侧边栏。</p>
    @endsection
     
    @section('content')
        <p>这是主体内容。</p>
    @endsection
    

      

  • 相关阅读:
    5/14 补沙
    5/21 购填缝剂
    5/30 购水不漏
    6/1 购防水
    6/4 补防水
    5/21 人工
    5/7 增购电线
    6/2 补防水
    5/4 瓦工进场
    5/31 补瓷砖
  • 原文地址:https://www.cnblogs.com/chenliuxiao/p/9255336.html
Copyright © 2011-2022 走看看