Blade模板继承 和 区块
<!-- 文件保存于 resources/views/layouts/app.blade.php -->
<html>
<head>
<title>应用程序名称 - @yield('title')</title>
</head>
<body>
@section('sidebar')
这是主布局的侧边栏。
@show
<div class="container">
@yield('content')
</div>
</body>
</html>
<!-- 文件保存于 resources/views/layouts/child.blade.php -->
@extends('layouts.app')
@section('title', 'Page Title')
@section('sidebar')
<p>这将追加到主布局的侧边栏。</p>
@endsection
@section('content')
<p>这是主体内容。</p>
@endsection
