base layout 中需要使用

@section("section_name")
区块链是什么?
@show

继承的 blade 中需要使用

@section("section_name")
区块链的定义
@endsection

其会覆盖父模板中的内容。

如果需要基于原 layout section 附加内容

@section("section_name")
	@parent
	<p>区块链是xxx</p>
@endsection

@yield 类似于 @section/show 的用法,但是其继承者不能使用 @parent。

相关文章:

  • 2022-12-23
  • 2021-08-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-03
  • 2022-12-23
  • 2021-10-20
  • 2022-12-23
  • 2021-10-05
  • 2022-12-23
相关资源
相似解决方案