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

its not @stop its @endsection btw..

in your layout.blade.php do @yield('css') or @yield('js')

then in your template where you want to add specific js/css just do @section('css') blah @endsection..

its been working for me.. (5.1 btw)

0

Your layout.blade.php (your parent layout) needs to yield the content. So change this:

@section('css')
@stop

to this:

@yield('css')

Also, both @stop and @endsection will work. From what I understand, both will generate <?php $__env->stopSection(); ?> so I actually don't know what the differences are between the two.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

dkwweb dkwweb Joined 18 Oct 2015

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.