Commit 9dbbc584 authored by Taylor Otwell's avatar Taylor Otwell

Fix blade @includes.

parent 33cc89a7
...@@ -256,7 +256,7 @@ class Blade { ...@@ -256,7 +256,7 @@ class Blade {
{ {
$pattern = static::matcher('include'); $pattern = static::matcher('include');
return preg_replace($pattern, '$1<?php echo render$2->with(get_defined_vars()); ?>', $value); return preg_replace($pattern, '$1<?php echo view$2->with(get_defined_vars()); ?>', $value);
} }
/** /**
......
...@@ -426,6 +426,20 @@ function has_php($version) ...@@ -426,6 +426,20 @@ function has_php($version)
return version_compare(PHP_VERSION, $version) >= 0; return version_compare(PHP_VERSION, $version) >= 0;
} }
/**
* Get a view instance.
*
* @param string $view
* @param array $data
* @return View
*/
function view($view, $data = array())
{
if (is_null($view)) return '';
return Laravel\View::make($view, $data);
}
/** /**
* Render the given view. * Render the given view.
* *
......
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