Ok, this is what I tried and I can confirm that this works, at least for Laravel 5+ (I have L5.2). Here's how I suggest you use your blade templates.
Let's start by saying that to get a section into another section, you must define your included section before defining a container section. So, with this clear, I solved this situation as follows:
I have a main blade template (main.blade.php) that has something like:
<section class="content"> @yield('main-content') </section>
I have a second click (common.blade.php) that has the same material that you can show on many pages, and where the main content section is defined. It looks like this:
@section('main-content') <div class="container"> @yield('extra-content') </div> @endsection
Finally, I got a third template (test.blade.php) that extends the main template and includes the general material that I want to show, but be careful because the order matters. It looks like this:
@extends('main') @section('extra-content') <div> <span> This is a test! </span> </div> @endsection @include('common')
In your controller or your route (wherever you return your view) you must return the third template.
source share