From 7475bcd3480aaa5a6897437c7e903b040fd96010 Mon Sep 17 00:00:00 2001 From: Jakobud Date: Wed, 25 Jul 2012 10:08:54 -0600 Subject: [PATCH] Added documentation for the @render() Blade method Signed-off-by: Jakobud --- laravel/documentation/views/templating.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/laravel/documentation/views/templating.md b/laravel/documentation/views/templating.md index a2273c19..d9756e26 100644 --- a/laravel/documentation/views/templating.md +++ b/laravel/documentation/views/templating.md @@ -64,18 +64,21 @@ ## Blade Template Engine #### Echoing a variable using Blade: Hello, {{$name}}. - + #### Echoing function results using Blade: {{ Asset::styles() }} -#### Rendering a view: +#### Render a view: + +You can use **@include** to render a view into another view. The rendered view will automatically inherit all of the data from the current view.

Profile - @include('user.profile') -> **Note:** When using the **@include** Blade expression, the view will automatically inherit all of the current view data. +Similarly, you can use **@render**, which behaves the same as **@include** except the rendered view will **not** inherit the data from the current view. + + @render('admin.list') #### Creating loops using Blade: @@ -124,7 +127,7 @@ #### The "unless" control structure: #### Blade comments: - + @if ($check) {{-- This is a comment --}} ... @@ -179,4 +182,4 @@ ## Blade Layouts Welcome to the profile page! @endsection -Notice the **@parent** Blade construct? It will be replaced with the contents of the layout's navigation section, providing you with a beautiful and powerful method of performing layout extension and inheritance. \ No newline at end of file +Notice the **@parent** Blade construct? It will be replaced with the contents of the layout's navigation section, providing you with a beautiful and powerful method of performing layout extension and inheritance.