Skip to content

Commit

Permalink
[4.2] Escape @parent
Browse files Browse the repository at this point in the history
  • Loading branch information
JayBizzle committed Mar 1, 2016
1 parent 867a146 commit 6a30a79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates.md
Expand Up @@ -55,7 +55,7 @@ Blade is a simple, yet powerful templating engine provided with Laravel. Unlike
@extends('layouts.master')

@section('sidebar')
@parent
@@parent

<p>This is appended to the master sidebar.</p>
@stop
Expand All @@ -64,7 +64,7 @@ Blade is a simple, yet powerful templating engine provided with Laravel. Unlike
<p>This is my body content.</p>
@stop

Note that views which `extend` a Blade layout simply override sections from the layout. Content of the layout can be included in a child view using the `@parent` directive in a section, allowing you to append to the contents of a layout section such as a sidebar or footer.
Note that views which `extend` a Blade layout simply override sections from the layout. Content of the layout can be included in a child view using the `@@parent` directive in a section, allowing you to append to the contents of a layout section such as a sidebar or footer.

Sometimes, such as when you are not sure if a section has been defined, you may wish to pass a default value to the `@yield` directive. You may pass the default value as the second argument:

Expand Down

0 comments on commit 6a30a79

Please sign in to comment.