@push is not working when used in @included partial view #864
Comments
This is intentional. The |
@sisve whether its intentional or not it's not intuitive or friendly - which is one of the key USPs for laravel. What's the point of being able to push things to it if you can only use them after the rendered output. Not saying if it should/shouldn't be re-thought to allow this functionality - however counter-productive responses don't help - might as well say "how can i stop google tracking me - then replying with - that's how google works" - something more helpful and beneficial helps everybody. @ajcastro What you're proposing does make complete sense, and although it does not currently work like this are you in a position where you could submit a PR for review? |
Well, all the code is executed from top to bottom, and the Laravel 5.4 is no longer supported, but I'm pretty sure that this behavior is still the same in Laravel 5.5. If this is implemented you would need to upgrade to Laravel 5.5 to take part of the changes. |
It looks like you're trying to use As far as I understand it, the
navbar.blade.php
|
Sections can append by using the
|
Its laravel 6 now, and stacks still not working from partial views included with @include. It cannot be one way or another. It should either work in all cases, or removed as a feature. |
Laravel Version:
5.4.32
Example, this doesn't work:
layouts/app.blade.php
navbar.blade.php
But if you bring the
@stack('styles')
after@include
it will work.But we want the styles should be in
<head>
The text was updated successfully, but these errors were encountered: