samedi 8 juillet 2017

Yield is not showing nothing

I have this file structure for the home page:

- views
    - home
      - header.blade.php
      - nav.blade.php  
      - main.blade.php
      - footer.blade.php
    - welcome.blade.php

In the welcome.blade.php I have the html tags, css links and then in the body:

<body>
@yield('header')
@yield('nav')
@yield('main')
@yield('footer')
</body>

Then inside each file (header.blade.php, nav, main and footer) I have, for example for the footer.blade.php I have this: (the other files I use the same logic)

@extends('welcome')
@section('footer')
<footer>
   <p>This is the footer</p>
</footer>
@endsection

The issue is that When I access the page I get a blank page so the @yield is not working. Do you know why?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2tt1IzY
via IFTTT

Aucun commentaire:

Enregistrer un commentaire