Laravel Blade Templates: Stacks

@push('scripts')
    <script src="https://laravel.com/example.js"></script>
@endpush
<head>
    <!-- Head Contents -->

    @stack('scripts')
</head>
@push('scripts')
    This will be second...
@endpush

// Later...

@prepend('scripts')
    This will be first...
@endprepend

You may push to a stack as many times as needed.

Laravel Blade Templates: Stacks — Structure map

Clickable & Draggable!

Laravel Blade Templates: Stacks — Related pages: