First i got a app.blade.php file
Inside this file i put this. I import all the file needed here.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div id="app">
<main>
<div class="container-fluid">
@yield('content')
</div>
</main>
</div>
</body>
</html>
You can see got a thing call @yield('content'). This is the location where i put content inside.
Than i got another file name index.blade.php
@extends('app')
@section('content')
<h1>Content Here</h1>
@endsection
As you can see the @extend('app') is the my first file name. This will get all my html inside @section('content') and put inside the @yield('content') which located in my first file.
This is how i use it. The same header will compile to each file you open.
Mean you can open many index file with the same header. You no need to copy and paste the header again and again to each html file.