protected function registerTwigExtensions() { \Twig::addTokenParser(new ExtendsParent()); $this->app->bindIf('lava83.twig.loader.filesystem', function () { return new Filesystem($this->app['config']['view.paths']); }, true); \Twig::getLoader()->addLoader($this->app['lava83.twig.loader.filesystem']); }