My main template blade has a @yield('section_name') in the <head> tag to append css/ js. Now I have a forelse like this:
@forelse($collection as $item)
some text
@section('section_name')
// link to stylesheet
@endsection
@empty
// something went wrong
@endforelse
When this loops for like 5 times, only one stylesheet is added. After that, it seems like the @yield is not working anymore. Is there a way to make this work so I can keep appending items to that section?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire