Search code examples
phplaravellaravel-bladeyieldsections

Blade template: Is it possible to yield a section which is defined in parent?


I'm trying to insert a piece of code wherever it is yielded, even if it is yielded inside a child view. I want the child view to load the section which is defined inside the parent. This should be a different position for every child.

Is this possible?


Solution

  • Why don't you use @include() to include the child section wherever you want.