Get the evaluated view contents for the given file.

@param  string $path
@param  array $data
@param  array $mergeData

@return View
977692
public static function file( $path, $data = [], $mergeData = [] )
	{
		return static::__do( __FUNCTION__, args_with_keys( func_get_args(), __CLASS__, __FUNCTION__ ) );
	}
107604
protected function view( $path, $data = array() ){
		return $this->view->render( $this->response, $path, $data );
	}
653248
public function renderView($viewPath = null, $data = [], $layout = null)
    {
        ob_start();
        require($viewPath);
        $viewData = ob_get_contents();
        ob_end_clean();
        foreach($data as $key => $val) {
            if(is_array($val)) {
                if($key == 'meta') {
                    $this->data['meta'] = $val;
                }
            }
            else {
                $viewData = str_replace('{{'.$key.'}}', $val, $viewData);
            }
        }
        return $viewData;
    }
303535
public static function get($path, $data = [])
	{
		ob_start();

		extract($data);

		try {
			$basePath = static::getInstance()->basePath;

			if ($basePath !== null) {
				if (mb_substr($path, 0, 1) === static::DIRECTORY_SEPARATOR) {
					$path = mb_substr($path, 1);
				}

				if (mb_substr($basePath, -1) === static::DIRECTORY_SEPARATOR) {
					$basePath = mb_substr($basePath, 0, -1);
				}

				$path = $basePath . static::DIRECTORY_SEPARATOR . $path;
			}

			include $path;
		} catch (\Exception $e) {
			ob_get_clean();
			throw $e;
		}

		return ob_get_clean();
	}
734134
public function render($view, $data = [], $mergeData = [])
    {
        $this->results = [];

        $viewPath = $this->getViewPath($view);

        if ($viewPath === null) {
            throw new InvalidArgumentException("View [{$view}] not found.");
        }

        $data = array_merge($mergeData, $data);

        extract($data);

        include($viewPath);

        return $this->results;
    }
334000
protected function evaluatePath($__path, $__data)
	{
		ob_start();

		extract($__data);

		// We'll evaluate the contents of the view inside a try/catch block so we can
		// flush out any stray output that might get out before an error occurs or
		// an exception is thrown. This prevents any partial views from leaking.
		try
		{
			include $__path;
		}
		catch (\Exception $e)
		{
			$this->handleViewException($e);
		}

		return ltrim(ob_get_clean());
	}
79118
public function view($view, array $data = [], $mergeData = [])
    {
        $data['template'] = $this;

        if ($view instanceof View) {
            return $view->with($data);
        }

        return view($this->getViewPath($view), $data, $mergeData);
    }
701647
protected function getValue(array $data, array $path)
    {
        $found = true;

        for ($x = 0; ($x < count($path) && $found); $x++) {
            $key = $path[$x];

            if (isset($data[$key])) {
                $data = $data[$key];
            } else {
                $found = false;
            }
        }

        if ($found) {
            return $data;
        }
        return null;
    }
1360736
protected function setContent($view, $data = array(), $mergeData = array())
	{
		if ( ! is_null($view))
		{
			if (is_string($view))
			{
				$this->layout->content = View::make($view, $data, $mergeData);
			}
			else {
				$this->layout->content = $view;
			}
		}
	}
1067581
public function load($file_path, Array $data = array())
    {
        $file_path = dirname(__FILE__) . '/Views/' . $file_path;

        if (!is_readable($file_path) ) {
            throw new Exception('View not found ' . $file_path . '.');
        }

        $clean_room = function($__file_name, array $__data)
        {
            extract($__data, EXTR_REFS);

            // Capture the view output
            ob_start();

            try
            {
                // Load the view within the current scope
                require $__file_name;
            }
            catch (\Exception $e)
            {
                // Delete the output buffer
                ob_end_clean();

                // Re-throw the exception
                throw $e;
            }

            // Get the captured output and close the buffer
            return ob_get_clean();
        };
        return $clean_room($file_path, $data);
    }
699458
public function render($view, $data = [], $mergeData = [])
    {
        view()->share('content_class', 'app-content app-content--gridstack page-datatables');
        $this->addFilters();
        return parent::render($view, $data, $mergeData);
    }
178473
public function cache($data, $view, $mergeData = null, $minutes = null, $key = null, $tag = null)
    {
        if (! $this->enabled) {
            return call_user_func($this->renderView($view, $data, $mergeData));
        }

        $viewKey = $this->getCacheKeyForView($view, $key);

        $mergeData = $mergeData ?: [];

        $tags = $this->getTags($tag);

        $minutes = $this->resolveCacheDuration($minutes);

        if ($this->cacheIsTaggable && $minutes === null) {
            return $this->cache
                ->tags($tags)
                ->rememberForever($viewKey, $this->renderView($view, $data, $mergeData));
        }

        if ($this->cacheIsTaggable) {
            return $this->cache
                ->tags($tags)
                ->remember($viewKey, $minutes, $this->renderView($view, $data, $mergeData));
        }

        if ($minutes === null) {
            return $this->cache
                ->rememberForever($viewKey, $this->renderView($view, $data, $mergeData));
        }

        return $this->cache
            ->remember($viewKey, $minutes, $this->renderView($view, $data, $mergeData));
    }
862300
public function get($path, array $data = [])
    {
        $contents = parent::get($path, $data);

        return $this->markdown->convertToHtml($contents);
    }
809619
public function render(array $data = [], string $path = 'gridView', array $mergeData = []): string
    {
        if (request()->ajax() || request()->wantsJson()) {
            $path = $path === 'gridView' ? 'part.grid' : $path;
        }

        return static::view($path, $data, $mergeData)->render();
    }
942735
public function make($view, $data = [], $mergeData = [])
    {
        if (isset($this->aliases[$view])) {
            $view = $this->aliases[$view];
        }

        try {
            $view = $this->normalizeName($view);
            $path = $this->finder->find($view);
            $data = array_merge($mergeData, $this->parseData($data));
            $this->callCreator($view = new View($this, $this->getEngineFromPath($path), $view, $path, $data));
            return $view;
        } catch (\Exception $e) {
            // Failing to find a view on disk will throw an exception.
            // Let this fall through to a 410 or 404 page.
        }

        // If no view is found then return the 410 page.
        try {
            $view = 'errors.410';
            $path = $this->finder->find($view);
            $data = array_merge($mergeData, $this->parseData($data));
            $this->callCreator($view = new View($this, $this->getEngineFromPath($path), $view, $path, $data));
            return $view;
        } catch (\Exception $e) {
        }

        // If we still have no page then return the 404 page.
        try {
            $view = 'errors.404';
            $path = $this->finder->find($view);
            $data = array_merge($mergeData, $this->parseData($data));
            $this->callCreator($view = new View($this, $this->getEngineFromPath($path), $view, $path, $data));
            return $view;
        } catch (\Exception $e) {
        }

        // We are hosed at this point.
        throw new \InvalidArgumentException("View [$view] not found.");
    }
1164015
public function getData($path = null)
    {
        return is_null($path) ? $this->dataDocument : $this->dataDocument->getNodeContent($path);
    }
453263
protected function evaluatePath( $__path, $__data )
	{
		$obLevel = ob_get_level();

		ob_start();

		extract( $__data, EXTR_SKIP );

		// We'll evaluate the contents of the view inside a try/catch block so we can
		// flush out any stray output that might get out before an error occurs or
		// an exception is thrown. This prevents any partial views from leaking.
		try
		{
			include $__path;
		}
		catch ( Exception $e )
		{
			$this->handleViewException0( $e, $obLevel );
		}
		catch ( Throwable $e )
		{
			$this->handleViewException0( $e, $obLevel );
		}

		return ltrim( ob_get_clean() );
	}