title: Laravel @extends not working properly when trying to reference main layout
body: <p>I have an issue with the <code>@extends()</code> function for Laravel. My views don't seem to extend the layout at all. I don't know how to fix this. </p>
  
  <p>Here is the main layout file (it's located in views>layouts>app.blade.php): </p>
  
  <pre><code>   &lt;!DOCTYPE html&gt;
  &lt;html lang="{{ str_replace('_', '-', app()-&gt;getLocale()) }}"&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
  
      &lt;!-- CSRF Token --&gt;
      &lt;meta name="csrf-token" content="{{ csrf_token() }}"&gt;
  
      &lt;title&gt;{{ config('app.name', 'Pet Me') }}&lt;/title&gt;
  
      &lt;!-- Scripts --&gt;
      &lt;script src="{{ asset('/js/app.js') }}" defer&gt;&lt;/script&gt;
  
      &lt;!-- Fonts --&gt;
      &lt;link rel="dns-prefetch" href="//fonts.gstatic.com"&gt;
      &lt;link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet"&gt;
  
      &lt;!-- Styles --&gt;
      &lt;link href="{{ asset('/css/app.css') }}" rel="stylesheet"&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  
  &lt;div id="app"&gt;
      &lt;nav class="navbar navbar-expand-md navbar-light bg-white shadow-sm"&gt;
          &lt;div class="container"&gt;
              &lt;a class="navbar-brand" href="{{ url('/') }}"&gt;
                  {{ config('app.name', 'Pet Me') }}
              &lt;/a&gt;
              &lt;button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}"&gt;
                  &lt;span class="navbar-toggler-icon"&gt;&lt;/span&gt;
              &lt;/button&gt;
  
              &lt;div class="collapse navbar-collapse" id="navbarSupportedContent"&gt;
                  &lt;!-- Left Side Of Navbar --&gt;
                  &lt;ul class="navbar-nav mr-auto"&gt;
  
                  &lt;/ul&gt;
  
                  &lt;!-- Right Side Of Navbar --&gt;
                  &lt;ul class="navbar-nav ml-auto"&gt;
                      &lt;!-- Authentication Links --&gt;
                      @guest
                          &lt;li class="nav-item"&gt;
                              &lt;a class="nav-link" href="{{ route('login') }}"&gt;{{ __('Login') }}&lt;/a&gt;
                          &lt;/li&gt;
                          @if (Route::has('register'))
                              &lt;li class="nav-item"&gt;
                                  &lt;a class="nav-link" href="{{ route('register') }}"&gt;{{ __('Register') }}&lt;/a&gt;
                              &lt;/li&gt;
                          @endif
                      @else
                          &lt;li class="nav-item dropdown"&gt;
                              &lt;a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre&gt;
                                  {{ Auth::user()-&gt;name }} &lt;span class="caret"&gt;&lt;/span&gt;
                              &lt;/a&gt;
  
                              &lt;div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown"&gt;
                                  &lt;a class="dropdown-item" href="{{ route('logout') }}"
                                     onclick="event.preventDefault();
                                                       document.getElementById('logout-form').submit();"&gt;
                                      {{ __('Logout') }}
                                  &lt;/a&gt;
  
                                  &lt;form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;"&gt;
                                      @csrf
                                  &lt;/form&gt;
                              &lt;/div&gt;
                          &lt;/li&gt;
                      @endguest
                  &lt;/ul&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/nav&gt;
  
      @if ($errors-&gt;any())
          &lt;div&gt;
              Errors:
              &lt;ul&gt;
                  @foreach ($errors-&gt;all() as $error)
                      &lt;li&gt;{{$error}}&lt;/li&gt;
                  @endforeach
              &lt;/ul&gt;
          &lt;/div&gt;
      @endif
  
      @if (session('message'))
          &lt;p&gt;&lt;b&gt;{{session ('message')}}&lt;/b&gt;&lt;/p&gt;
      @endif
  
      &lt;main class="py-4"&gt;
          @yield('content')
      &lt;/main&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and this is one of the views I am trying to have that extend app (located in views>home.blade.php):</p>
  
  <pre><code>@extends('layouts.app')
  
  @section('content')
  &lt;div class="container"&gt;
      &lt;div class="row justify-content-center"&gt;
          &lt;div class="col-md-8"&gt;
              &lt;div class="card"&gt;
                  &lt;div class="card-header"&gt;Dashboard&lt;/div&gt;
  
                  &lt;div class="card-body"&gt;
                      @if (session('status'))
                          &lt;div class="alert alert-success" role="alert"&gt;
                              {{ session('status') }}
                          &lt;/div&gt;
                      @endif
  
                      You are logged in!
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  @endsection
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/C3vQR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/C3vQR.png" alt="It doesn&#39;t look appropriate at all."></a></p>