Browse Source

Merge pull request #397 from maxzender/develop

Helper method for rendering views
Taylor Otwell 12 years ago
parent
commit
d8683bcf5b
1 changed files with 12 additions and 0 deletions
  1. 12 0
      laravel/helpers.php

+ 12 - 0
laravel/helpers.php

@@ -409,4 +409,16 @@ function with($object)
 function has_php($version)
 function has_php($version)
 {
 {
 	return version_compare(PHP_VERSION, $version) >= 0;
 	return version_compare(PHP_VERSION, $version) >= 0;
+}
+
+/**
+ * Render the given view.
+ *
+ * @param  string  $view
+ * @param  array   $data
+ * @return string
+ */
+function render($view, $data = array())
+{
+	return Laravel\View::make($view, $data)->render();
 }
 }