I am loading just one section from a Laravel Blade view using jQuery AJAX, following this approach. This is working fine.
The Blade view I'm loading a section from also has a couple of Blade stacks. How can I include those stacks in the AJAX response?
I've tried nesting the stacks inside the view section I'm calling, but the stacks still were not included in the response (though the stacks still work on the original complete view just fine).
FYI, the stacks are 'modals' (containing some Bootstrap modals) and 'scripts' (containing some JavaScripts).
Thanks!
EDIT
I used the wrong terms earlier. I said my view had stacks, when I should have said my view pushed to stacks:
@section('content')
<div>Hello, world.</div>
@endsection
@push('modals')
@include('modals.foo')
@include('modals.bar')
@endpush
@push('scripts')
<script src="example.js"></script>
<script src="another.js"></script>
@endpush
I want these 3 parts to be added to my page via AJAX ('content' section; which is working, and 'modals' push and 'scripts' push; which I need help with).