src/BladeExtensionServiceProvider.php
protected function defineBladeExtensions()
    {
        foreach ($this->app->tagged('blade.extension') as $extension) {
            if (! $extension instanceof BladeExtension) {
                throw new InvalidBladeExtension($extension);
            }

            foreach ($extension->getDirectives() as $name => $callable) {
                $this->app['blade.compiler']->directive($name, $callable);
            }

            foreach ($extension->getConditionals() as $name => $callable) {
                $this->app['blade.compiler']->if($name, $callable);
            }
        }
    }
protected function defineBladeExtensions()
    {
        foreach ($this->app->tagged('blade.extension') as $extension) {
            if (! $extension instanceof BladeExtension) {
                throw new InvalidBladeExtension($extension);
            }

            foreach ($extension->getDirectives() as $name => $callable) {
                $this->app['blade.compiler']->directive($name, $callable);
            }

            foreach ($extension->getConditionals() as $name => $callable) {
                $this->app['blade.compiler']->if($name, $callable);
            }
        }
    }
protected function defineBladeExtensions ( ) { foreach ( $ this -> app -> tagged ( 'blade.extension' ) as $ extension ) { if ( ! $ extension instanceof BladeExtension ) { throw new InvalidBladeExtension ( $ extension ) ; } foreach ( $ extension -> getDirectives ( ) as $ name => $ callable ) { $ this -> app [ 'blade.compiler' ] -> directive ( $ name , $ callable ) ; } foreach ( $ extension -> getConditionals ( ) as $ name => $ callable ) { $ this -> app [ 'blade.compiler' ] -> if ( $ name , $ callable ) ; } } }
Register Blade Extension directives and conditionals with the blade compiler

@return void
Register Blade Extension directives and conditionals with the blade compiler