From 7a5e887b8e07d39fcaa0e2621ebf10abc14be6fb Mon Sep 17 00:00:00 2001 From: uyab Date: Sat, 5 Dec 2015 08:40:52 +0700 Subject: [PATCH] add helper method: render() --- src/helpers.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/helpers.php b/src/helpers.php index 76e7648..ec818ff 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -11,3 +11,17 @@ function sui_pagination($collection) return new \Laravolt\Support\Pagination\SemanticUiPagination($collection); } } + +if (!function_exists('render')) { + + /** + * @param null $view + * @param array $data + * @param array $mergeData + * @return string + */ + function render($view = null, $data = [], $mergeData = []) + { + return view($view, $data, $mergeData)->render(); + } +}