示例#1
0
 /**
  * Compile a view and return the rendered output.
  *
  * @param string $name    The name of the view (relative to app/views)
  * @param array  $vars    Variables to pass to the view
  * @param array  $options Rendering options to pass to the view
  *
  * @return string The compiled HTML
  */
 function view($name, array $vars = [], array $options = [])
 {
     $view = new View($name, $vars, $options);
     return $view->render();
 }