Laravel docsから、次の 2 つの方法を使用してレイアウト内に「セクション」を含めることができます。
<html>
<body>
@section('sidebar')
This is the master sidebar.
@show
<div class="container">
@yield('content')
</div>
</body>
</html>
@yield
を使用していくつかのデフォルト コンテンツを渡すこともできる@yield('section', 'Default Content')
ため、@yield
使用@section
しない@parent
?
@section
<!-- Nothing here -->
@show
他にどのような違いがありますか?