protected function registerViewHelpers()
    {
        $this->app->extend('view', function (Factory $view) {
            $view->share('route', function ($name, $parameters = []) {
                return $this->app->make('FluxBB\Web\UrlGeneratorInterface')->toRoute($name, $parameters);
            });

            $view->share('asset', function ($path) {
                return $this->app->make('FluxBB\Web\UrlGeneratorInterface')->toAsset($path);
            });

            $view->share('canonical', function () {
                return $this->app->make('FluxBB\Web\UrlGeneratorInterface')->canonical();
            });

            $view->share('method', function ($name) {
                return $this->app->make('FluxBB\Web\Router')->getMethod($name);
            });

            return $view;
        });
    }