/**
  * 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;
     });
 }