Example #1
0
 /**
  * Renders a Blade template with passed and stored symbol data.
  *
  * @param string $view - view name i.e.: 'sample' resolves to [template_path]/sample.blade.php
  * @param array  $data
  *
  * @return string
  */
 public function render($view, $data = [])
 {
     # resolve the view path based on the template paths and the view name
     $view = $this->view_finder->find($view);
     # collect data from the context and other places
     $data = parent::collectContext($data);
     # create an illuminate view from stored factory and blade engine
     $blade_view = new IlluminateView($this->factory, $this->blade_engine, NULL, $view, (array) $data);
     # render and return the result
     return $blade_view->render();
 }
Example #2
0
 /**
  * View constructor.
  */
 public function __construct()
 {
     parent::__construct();
 }