Laravel - Blade Layout Files
problem: Editing the same element across different pages requires multiple edits to be made.
solution: Blade layout files.
layout.blade.php
yield
keyword as placeholder for dynamic content i.e. @yield('content')
index.blade.php
extends
keyword i.e. @extends('layout')
section
keyword for dynamic content i.e. @section('content')
@endsection
An inline section can be used which removes the need for @endsection
i.e. @section('content', '<h1>Contact Us</h1>')
i.e. @section('title', 'Contact Us')