Skip to content

Template inheritance

Jorge Castro edited this page Apr 22, 2020 · 11 revisions

Template Inheritance

In the master page (layout)

Tag Note
@section('sidebar') Start a new section
@show Indicates where the content of the section will be displayed
@yield('title') Show here the content of a section

Using the master page (using the layout)

Tag Note
@extends('layouts.master') Indicates the layout to use
@section('title', 'Page Title') Sends a single text to a section
@section('sidebar') Start a block of code to send to a section
@endsection End a block of code

Note :(*) This feature is in the original documentation but it's not implemented either is it required. Maybe it's an obsolete feature.

Clone this wiki locally