Last active
May 3, 2017 12:56
-
-
Save bulfaitelo/64bcfde04483c8e80e726579a714fb8e to your computer and use it in GitHub Desktop.
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
<!-- Stored in resources/views/layouts/app.blade.php --> | |
<html> | |
<head> | |
<title>App Name - @yield('title')</title> | |
</head> | |
<body> | |
@section('menu') | |
This is the master sidebar. | |
@endsection | |
<div class="container"> | |
@yield('content') | |
</div> | |
</body> | |
</html> |
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
<!-- Stored in resources/views/child.blade.php --> | |
@extends('layouts.app') | |
@section('title', 'Page Title') | |
@section('sidebar') | |
@parent | |
<p>This is appended to the master sidebar.</p> | |
@endsection | |
@section('content') | |
<p>This is my body content.</p> | |
@endsection |
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
<?php | |
Route::get('blade', function () { | |
return view('child'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment