original_string: public function component($path, $alias = null)
      {
          $alias = $alias ?: Arr::last(explode('.', $path));
  
          $this->directive($alias, function ($expression) use ($path) {
              return $expression
                          ? "<?php \$__env->startComponent('{$path}', {$expression}); ?>"
                          : "<?php \$__env->startComponent('{$path}'); ?>";
          });
  
          $this->directive('end'.$alias, function ($expression) {
              return '<?php echo $__env->renderComponent(); ?>';
          });
      }
code: public function component($path, $alias = null)
      {
          $alias = $alias ?: Arr::last(explode('.', $path));
  
          $this->directive($alias, function ($expression) use ($path) {
              return $expression
                          ? "<?php \$__env->startComponent('{$path}', {$expression}); ?>"
                          : "<?php \$__env->startComponent('{$path}'); ?>";
          });
  
          $this->directive('end'.$alias, function ($expression) {
              return '<?php echo $__env->renderComponent(); ?>';
          });
      }
code_tokens: public function component ( $ path , $ alias = null ) { $ alias = $ alias ? : Arr :: last ( explode ( '.' , $ path ) ) ; $ this -> directive ( $ alias , function ( $ expression ) use ( $ path ) { return $ expression ? "<?php \$__env->startComponent('{$path}', {$expression}); ?>" : "<?php \$__env->startComponent('{$path}'); ?>" ; } ) ; $ this -> directive ( 'end' . $ alias , function ( $ expression ) { return '<?php echo $__env->renderComponent(); ?>' ; } ) ; }
docstring: Register a component alias directive.
  
  @param  string  $path
  @param  string  $alias
  @return void
docstring_tokens: Register a component alias directive .