Commit 31786c96 authored by Taylor Otwell's avatar Taylor Otwell

Cleaning up the Blade class.

parent 93e21e92
...@@ -108,7 +108,7 @@ class Blade { ...@@ -108,7 +108,7 @@ class Blade {
{ {
// If the Blade template is not using "layouts", we'll just return it // If the Blade template is not using "layouts", we'll just return it
// it unchanged since there is nothing to do with layouts and we'll // it unchanged since there is nothing to do with layouts and we'll
// just let the other Blade compilers handle it. // just let the other Blade compilers handle the rest.
if ( ! starts_with($value, '@layout')) if ( ! starts_with($value, '@layout'))
{ {
return $value; return $value;
...@@ -121,11 +121,11 @@ class Blade { ...@@ -121,11 +121,11 @@ class Blade {
$layout = static::extract($lines[0], '@layout'); $layout = static::extract($lines[0], '@layout');
$lines[] = "<?php echo render('{$layout}'); ?>";
// We will add a "render" statement to the end of the templates and // We will add a "render" statement to the end of the templates and
// and then slice off the @layout shortcut from the start so the // and then slice off the @layout shortcut from the start so the
// sections register before the parent template renders. // sections register before the parent template renders.
$lines[] = "<?php echo render('{$layout}'); ?>";
return implode(CRLF, array_slice($lines, 1)); return implode(CRLF, array_slice($lines, 1));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment