protected function registerFileExtensions()
    {
        $this->app->extend('view', function ($env, $app) {
            $fileexts = $app['config']['handlebars.fileext'];

            foreach ($fileexts as $fileext) {
                $env->addExtension(trim($fileext, '.'), 'handlebars');
            }

            return $env;
        });
    }