Support the ongoing development of Laravel.io →
posted 7 years ago
Views Blade
Last updated 2 years ago.
0

I'm still having the same problem. However I found out, that it has something todo with the order in which I place my @stack and @push statements. In short, if @push occurs before @stack, it's working, if it appears after, it doesn't so.. just to illustrate:

...
@push('styles')
<!-- CSS here -->
@endpush

@stack('styles')
...

This would work. However, this:

...
@stack('styles')

@push('styles')
<!-- CSS here -->
@endpush
...

doesn't work. Is this intended behaviour? If so, how am I supposed to inject custom styles for certain views if my @stack is in the header and I @push to it inside a view?

0

The same issue for me. So do you find out the solution or what the problem is?

0

Yes, this is the intended behaviour. See this thread.

Last updated 7 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

minikN minikn Joined 8 Dec 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.