What is the difference between Section and Stack in Blade?

前端 未结 3 1847
忘了有多久
忘了有多久 2021-02-03 20:50

We can use a section to define some HTML and then yield that somewhere else.

So why do we have stacks? https://laravel.com/docs/5.2/blade#sta

3条回答
  •  温柔的废话
    2021-02-03 21:37

    @section - You can add your js css once.
    @stack   - Push js css into stack (page) many times.
    

提交回复
热议问题