Created
November 2, 2018 10:00
-
-
Save curder/31230b2b98f6f92b2af223e22cf26bed to your computer and use it in GitHub Desktop.
Basic layout master page for Laravel Blade template. https://medium.com/@petehouston/basic-layout-master-page-for-laravel-blade-template-631e6f289dfa
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{-- file: resources/views/layouts/master.blade.php --}} | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
{{-- Part: all meta-related contents --}} | |
@yield('head-meta') | |
{{-- Part: site title with default value in parent --}} | |
@section('head-title') | |
<title>Site title</title> | |
@stop | |
{{-- Part: load fonts --}} | |
@yield('head-fonts') | |
{{-- Part: load styles for the page --}} | |
@yield('head-styles') | |
{{-- Part: load scripts needed --}} | |
@yield('head-scripts') | |
{{-- Part: anything else in head --}} | |
@yield('head-extra') | |
</head> | |
<body> | |
{{-- Part: something at start of body --}} | |
@yield('body-start') | |
{{-- Part: header of body --}} | |
@section('body-header') | |
{{-- Part: navigation bar --}} | |
@include('partials.navbar') | |
@show | |
{{-- Part: create main content of the page --}} | |
@yield('body-content') | |
{{-- Part: footer --}} | |
@section('body-footer') | |
{{-- Part: footer is probably shared across many pages --}} | |
@include('partials.footer') | |
@show | |
{{-- Part: load scripts --}} | |
@yield('body-scripts') | |
{{-- Part: something else to do --}} | |
@yield('body-others') | |
{{-- Part: finalize stuffs if there is --}} | |
@yield('body-end') | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment