Fix blade @includes.
This commit is contained in:
parent
33cc89a711
commit
9dbbc5848b
|
@ -256,7 +256,7 @@ protected static function compile_includes($value)
|
|||
{
|
||||
$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)
|
|||
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.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue