1. Home
  2. Blade
  3. Layout
#blade#layout

Simple example of extending layouts and using sections.

// home.blade.php

@extends('default')

@section('content')
    <main>Welcome to my homepage.</main>
@endsection


// default.blade.php extended by home.blade.php

<!DOCTYPE html>
<head>
    <title>Page title</title>
</head>
<body>
    @yield('content')
</body>
</html>
copy
Full Blade cheatsheet
Sitemap Git repository