filename : main.blade.php
<html>
<head>
<title>App Name - @yield('title')</title>
</head>
<body>
@section('sidebar')
This is the master sidebar.
@stop
<div class="container">
@yield('content')
</div>
</body>
</html>
filename: index.blade.php
@extends('layouts.main')
{{-- point to title , attach @yield --}}
@section('title','demo')
{{--
父@show,子() : 页面继承, 父页面滞后显示,
父@stop,子() : 子页面显示, 父页面被覆盖,
父(),子@show : 页面继承, 父页面滞后显示,
父(),子@stop : 父页面显示,子页面不显示.
父@show,子@show : 页面继承, 父页面滞后显示,
父@show,子@stop : 子页面显示, 父页面被覆盖,
父@stop,子@show : 子页面显示, 父页面被覆盖,
父@stop,子@stop : 所有的页面都不显示.
--}}
@section('sidebar')
This is the childer sidebar.
@stop