Yielding the Current Section in a Blade Template


You want to yield the contents of the section you're currently in.


Use the Blade @show command.

This ends the current section and yields it. Yielding means this is the point the content of the section will be output.

  Something here
  But we'll end it, so it won't output

  Something else

The HTML output from above would be.

Something else


You can think of @show as a @stop followed by a @yield('section').

comments powered by Disqus