Maybe is cause you are calling it in the same template ?
Make a new blade and extend it from there then call the section.
app.blade:
@yield('carometers')
another.blade:
@extends('app.blade')
@section('carometers')
content
@endsection
Thanks for answering.
Sorry, I ended up messing up the code when posting. My code is the same as what you wrote.
The folder structure looks like this: views / frontend / layout / app.blade.php
In app.blade.php is the header and footer. In this screen I have: (@yield ('carometers'))
In the carometro view I have:
@extends ('frontend.layout.app') @section ('carometers') ... @endsection
On screen only loads the header and footer. The section does not load.
Have you added the directive
@parent
As in
@section('x)
@parent
Content
@endsection
Also check this out it will help you.
https://laravel.com/docs/6.x/blade
Thanks again for the help, but it didn't work out. I do not know what happens. I looked at the documentation and did the same, but it doesn't work.
Good night, I could understand and see where I was going wrong. Thanks a lot for the help.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community