Lestah
686
49
Laravel

@yield is not working

Posted 6 months ago by Lestah

on my main.blade.php

@yield('header')

on my home.blade.php


@section('header')

<header class="masthead" style="background-image: url('template/img/home-bg.jpg')">
    <div class="overlay"></div>
    <div class="container">
      <div class="row">
        <div class="col-lg-8 col-md-10 mx-auto">
          <div class="site-heading">
            <h1>Clean Blog</h1>
            <span class="subheading">A Blog Theme by Start Bootstrap</span>
          </div>
        </div>
      </div>
    </div>
  </header> 

@endsection

what could be wrong?

Please sign in or create an account to participate in this conversation.