Support the ongoing development of Laravel.io →
Requests Views Blade
Last updated 2 years ago.
0

It's actually the other way around. You don't include the template but you let your home or news template extend the index template. Check out http://laravel.com/docs/5.1/blade#template-inheritance

So basically you say

return view('home');

and inside your home.blade.php you say

@extends('index')

@section('content')
    <p>Hi Mum</p>
@endsection

And inside your index.blade.php you say

<html>
    <head></head>
    <body>
        @yield('content')
    </body>
</html>
Last updated 9 years ago.
0

Thanks a lot for Your hint, works as supposed. Thank You.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

brulbo brulbo Joined 25 Aug 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.