public function __construct($viewPaths, $cachePath, ContainerInterface $container = null) { $this->viewPaths = $viewPaths; $this->cachePath = $cachePath; $this->container = $container ?: new Container(); $this->setupContainer(); (new ViewServiceProvider($this->container))->register(); $this->engineResolver = $this->container->make('view.engine.resolver'); }