Laravel - Blade Templates - Stacks

Blade allows you to push to named stacks which can be rendered somewhere else in another view or layout. This can be particularly useful for specifying any JavaScript libraries required by your child views:


You may push to a stack as many times as needed. To render the complete stack contents, pass the name of the stack to the @stack directive:


If you would like to prepend content onto the beginning of a stack, you should use the @prepend directive:

        This will be second...
    // Later...
        This will be first...