/** * Add a view instance to the view data. * * @param string $key * @param string $view * @param array $data * @return \Themosis\View\View */ public function nest($key, $view, array $data = array()) { return $this->with($key, $this->factory->make($view, $data)); }
/** * Register the view factory. The factory is * available in all views. * * @return void */ protected function igniteViewFactory() { $this->app->bindShared('view', function ($app) { $viewEnv = new ViewFactory($app['view.engine.resolver'], $app['view.finder'], $app['action']); // Set the IoC container. $viewEnv->setContainer($app); // Register the container as a shared view data. $viewEnv->share('__app', $app); return $viewEnv; }); }