@@ -256,7 +256,7 @@ class Blade {
{
$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.
*