BKWLD / laravel-haml

Wraps MtHaml for ease use in Laravel
MIT License
45 stars 10 forks source link

Import custom directives from default blade compiler #25

Closed benallfree closed 6 years ago

benallfree commented 6 years ago

Hi, here is a small PR to import custom directives from the default BladeCompiler. Some Laravel plugins like Ziggy add custom directives via

   $this->app['blade.compiler']->directive('routes', function ($group) {
      return "<?php echo app('" . BladeRouteGenerator::class . "')->generate({$group}); ?>";
    });

...but they are not picked up by laravel-haml because it is a separate BladeCompiler.

benallfree commented 6 years ago

Nevermind. Service provider positioning accomplished this.

benallfree commented 6 years ago

Sorry I was right the first time, reopening.

weotch commented 6 years ago

Thanks! I tagged as 2.4.0