diff --git a/app/laravel/blade.php b/app/laravel/blade.php index e9d91c214..f1cba5647 100644 --- a/app/laravel/blade.php +++ b/app/laravel/blade.php @@ -366,9 +366,9 @@ protected static function compile_render_each($value) */ protected static function compile_yields($value) { - $pattern = static::matcher('yield'); + $pattern = static::matcher('yieldContent'); - return preg_replace($pattern, '$1', $value); + return preg_replace($pattern, '$1', $value); } /** @@ -449,4 +449,4 @@ public static function compiled($path) return path('storage').'views/'.md5($path); } -} \ No newline at end of file +} diff --git a/app/laravel/helpers.php b/app/laravel/helpers.php index 513e3baae..2713654ad 100644 --- a/app/laravel/helpers.php +++ b/app/laravel/helpers.php @@ -560,9 +560,9 @@ function render_each($partial, array $data, $iterator, $empty = 'raw|') * @param string $section * @return string */ -function yield($section) +function yieldContent($section) { - return Laravel\Section::yield($section); + return Laravel\Section::yieldContent($section); } /** diff --git a/app/laravel/section.php b/app/laravel/section.php index 9638880ce..e14520cfa 100644 --- a/app/laravel/section.php +++ b/app/laravel/section.php @@ -67,9 +67,9 @@ public static function inject($section, $content) * * @return string */ - public static function yield_section() + public static function yieldContent_section() { - return static::yield(static::stop()); + return static::yieldContent(static::stop()); } /** @@ -128,7 +128,7 @@ public static function append($section, $content) * @param string $section * @return string */ - public static function yield($section) + public static function yieldContent($section) { return (isset(static::$sections[$section])) ? static::$sections[$section] : ''; } diff --git a/app/laravel/tests/cases/blade.test.php b/app/laravel/tests/cases/blade.test.php index fb60cc21a..291077991 100644 --- a/app/laravel/tests/cases/blade.test.php +++ b/app/laravel/tests/cases/blade.test.php @@ -66,15 +66,15 @@ public function testControlStructuresAreCreatedCorrectly() } /** - * Test the compilation of yield statements. + * Test the compilation of yieldContent statements. * * @group laravel */ public function testYieldsAreCompiledCorrectly() { - $blade = "@yield('something')"; + $blade = "@yieldContent('something')"; - $this->assertEquals("", Blade::compile_string($blade)); + $this->assertEquals("", Blade::compile_string($blade)); } /**