1. Home
  2. Blade
  3. Layout

Simple example of extending layouts and using sections.

#blade#layout
// 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
NordVPN NordVPN