Why does Blade includes goes before sections in the rendered output the tested code shown below? Is there a way to put after or the middle of sections?
// Specify the filename of the layout (without extension)
// The rest of the code of the view template
// Opening content section
// The content that will be injected in the layout replacing “@yield(‘content’)”
This is the home pagevvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
// Closing content section
<p>This is just Content</p>
<p>This is More Content</p>
<p>This is Even More Content</p>
No, I see no way to do that, and as you are extending a template the only thing that is being rendered is the
layout with the sections you define.
If you want to change the order in the output, the
layout file is where you can do this.
You should edit the extended template. You can add another section in the
template file (
@yield('naveigation')) and the define the
navigation section later.
In this file:
@section('navigation') @include('navigation') @stop
Layout <br> Nav: <br> @yield('navigation') <br> Content: <br> @yield('content')