protected function registerBlade($name)
    {
        $this->blade->extend(function ($view, $compiler) use ($name) {
            $pattern = $this->createMatcher($name);

            $replace = '$1<?php echo Widget::'.$name.'$2; ?>';

            return preg_replace($pattern, $replace, $view);
        });
    }